asp.net and htmltag with no runat=server

  • Thread starter Thread starter Steph
  • Start date Start date
S

Steph

hello,
i'am looking for manipulate a html tag without runat=server.
Because :
1 : runat server tag : add a uniqid (not manipulated with javascript/dom in
dynamic code)
2 : i want set my own clientID on my html tag

how do :
<asp:CheckBox id="john" runat="server"></asp:CheckBox>
and obtain :
<input type=checkbox id="john"> !!!! and not
<input type=checkbox id="ctl00_blablabla_john"> ......

thx

steph
 
Steph,
This is an ASP.NET question and should be posted at the ASP.NET group, it
isn't a C# language -related question.
Peter
 
Steph,

You get this ctl00_blablabla_ prefix because the check box is in some naming
container. If you placed directly on the page there is not going to be any
prefixes.

Actyally the prefix makes sure that there is no 2 controls with the same ID,
which can happen if the page uses User Controls

What exactly is that you wanna do? What do you mean by manipulate?
Manipulate on the client side or on the server side in other words from code
behind or from javascript?

Finally why is the prefixing such a big deal?
 
Back
Top