ctl100
asked on
Why does (runat="server") prefix my id tags with ctl100_?
In my html document I have a line like:
<h1 runat="server" id="testText">SAMPLE HEADING</h1>
to dynamically change the inner text at run time in the code behind using:
this.testText.innerText="N EW HEADING";
....
I want to be able to use CSS to style this heading based on the id tag of "testText"; however at run-time the id name gets prefixed with "ctl100_"
Is there a way to prevent this prefixing?
Using C# and ASP.NET 2.0
<h1 runat="server" id="testText">SAMPLE HEADING</h1>
to dynamically change the inner text at run time in the code behind using:
this.testText.innerText="N
....
I want to be able to use CSS to style this heading based on the id tag of "testText"; however at run-time the id name gets prefixed with "ctl100_"
Is there a way to prevent this prefixing?
Using C# and ASP.NET 2.0
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi tetorvik,
Good approach for the incoming .net 4.0 framework. Thanks for sharing thought here.
Good approach for the incoming .net 4.0 framework. Thanks for sharing thought here.
ASKER