If I have a placeholder that looks like this:
<asp:contentplaceholder ID="Body" runat="server"></asp:contentplaceholder>
And inside of it are several other elements that are runat="server" with ID properties, then I get something like this:
<span id="Body_T966DB943018">
<div id="Body_T966DB943007_ctl00_ctl00_main"></div>
</span>
Is there a way to set up my contentplaceholder such that the output appears like this:
<span id="T966DB943018">
<div id="T966DB943007_ctl00_ctl00_main"></div>
</span>
(notice the lack of the "Body_" in all generated IDs)
If you want to know why I'm asking...
I am using Sitefinity. By default, you can set up templates in a back end GUI. This was how the site was originally constructed.
The latter HTML structure is how the CMS has generated templates on the page. Initial construction of CSS and JS used these generated ID's. Now we have added a master template file, and we need to put a default contentplaceholder for Sitefinity's content.
I need to find a way to have this default placeholder (shown above with ID="Body" to not affect the ID's of its children.
If you want to change the behavior for the entire site you can do it in
web.configby setting the ClientIDMode.Or at the page level.
Or at the individual control level.
Keep in mind you'll need to ensure your Client ID's are unique to avoid conflicts.