Re: Framework-generated ID woes
- From: "mark.norgate@xxxxxxxxx" <mark.norgate@xxxxxxxxx>
- Date: 19 Jun 2006 01:26:09 -0700
Darn it. No way to specify the ID prefix? Seems dangerous to modify
this ClientID property (if that's even possible, haven't looked...)
Mark
Bruno Alexandre wrote:
component.ClientID
:-)
like:
document.getElementById( '<%= myLabel.ClientID %>' ).value = 'test';
--
Bruno Alexandre
(a Portuguese in Københanv, Danmark)
<mark.norgate@xxxxxxxxx> escreveu na mensagem
news:1150292921.945833.79700@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi
I have lots of controls on my ASP.NET 2.0 page, some implementing
INamingContainer, others just <asp:button>s and so on.
The eternal lament: I need to interact with these controls on the
client-side, but of course I can't guarantee that the IDs generated by
the Framework will be consistent (like
"ctl00_ContentPlaceHolder_LoadPreviousButton").
Is there a way to tell the Framework what prefix you'd like to use for
your controls' IDs? Or do I have to resort to injecting some JavaScript
containing the ID into the page (which is rather ugly I think). If so,
how do I actually get the fully-qualified name of the control?
Thanks, Mark
.
- Follow-Ups:
- Re: Framework-generated ID woes
- From: Bruno Alexandre
- Re: Framework-generated ID woes
- References:
- Framework-generated ID woes
- From: mark.norgate@xxxxxxxxx
- Re: Framework-generated ID woes
- From: Bruno Alexandre
- Framework-generated ID woes
- Prev by Date: Re: Solution in ASP
- Next by Date: Remote logon page like Microsoft passport
- Previous by thread: Re: Framework-generated ID woes
- Next by thread: Re: Framework-generated ID woes
- Index(es):