PC Review


Reply
Thread Tools Rate Thread

asp.net and htmltag with no runat=server

 
 
Steph
Guest
Posts: n/a
 
      25th Aug 2006
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


 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      25th Aug 2006
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

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




"Steph" wrote:

> 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
>
>
>

 
Reply With Quote
 
Stoitcho Goutsev \(100\)
Guest
Posts: n/a
 
      25th Aug 2006
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?


--
Stoitcho Goutsev (100)

"Steph" <(E-Mail Removed)> wrote in message
news:44ef5eda$0$27380$(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
runat=server Tony Johansson Microsoft C# .NET 2 7th May 2011 09:18 PM
runat=server Tony Johansson Microsoft ASP .NET 2 30th Nov 2009 11:10 PM
ASP Runat server jack Microsoft ASP .NET 0 26th Dec 2005 07:00 AM
getting rid of runat=server !!! Alireza Sami via .NET 247 Microsoft ASP .NET 2 29th May 2005 04:24 PM
How to get reference of the <body runat=server id=.../> on server side? feng Microsoft ASP .NET 1 29th Feb 2004 12:37 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:26 AM.