Is there a way to prevent the INamingContainer behaviour that prefixes the
id of server controls in master pages with the format [master page
id]_[content id]_. I would prefer to manage the potential id attribute
conflicts myself, rather than having such verbose id attributes throughout
my site.
Thanks,
~PJ 5 1843
The problem is that you don't know what some other control will emit for
an ID. I imagine what your problem is is that you want to hard code the ID
in your javascript to a well known value. Instead of hard coding, the approach
is to dynamically emit your javascript with the proper ID using the Control.ClientID
property.
-Brock
DevelopMentor http://staff.develop.com/ballen Is there a way to prevent the INamingContainer behaviour that prefixes the id of server controls in master pages with the format [master page id]_[content id]_. I would prefer to manage the potential id attribute conflicts myself, rather than having such verbose id attributes throughout my site.
Thanks, ~PJ
The id is known, one can set the id on the master page, content place holder
controls, etc. The pattern is always the same. I know what the final
rendered id value will be and can set the proper css/javascript selectors
properly ahead of time.
My problem is simply not having total control of the rendered id attributes
and the verbosity of the rendered values.
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:b8**************************@msnews.microsoft .com... The problem is that you don't know what some other control will emit for an ID. I imagine what your problem is is that you want to hard code the ID in your javascript to a well known value. Instead of hard coding, the
approach is to dynamically emit your javascript with the proper ID using the
Control.ClientID property.
-Brock DevelopMentor http://staff.develop.com/ballen
Is there a way to prevent the INamingContainer behaviour that prefixes the id of server controls in master pages with the format [master page id]_[content id]_. I would prefer to manage the potential id attribute conflicts myself, rather than having such verbose id attributes throughout my site.
Thanks, ~PJ
Sure, of course you can make it work. I think what I was trying to say is
that the pattern is what's documented to potentially change in the future,
thus the preference to use the ClientID property and merge that dynamically
into your javascript.
-Brock
DevelopMentor http://staff.develop.com/ballen The id is known, one can set the id on the master page, content place holder controls, etc. The pattern is always the same. I know what the final rendered id value will be and can set the proper css/javascript selectors properly ahead of time.
My problem is simply not having total control of the rendered id attributes and the verbosity of the rendered values.
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message news:b8**************************@msnews.microsoft .com...
The problem is that you don't know what some other control will emit for an ID. I imagine what your problem is is that you want to hard code the ID in your javascript to a well known value. Instead of hard coding, the approach
is to dynamically emit your javascript with the proper ID using the Control.ClientID
property.
-Brock DevelopMentor http://staff.develop.com/ballen Is there a way to prevent the INamingContainer behaviour that prefixes the id of server controls in master pages with the format [master page id]_[content id]_. I would prefer to manage the potential id attribute conflicts myself, rather than having such verbose id attributes throughout my site.
Thanks, ~PJ
You're seriously are recommending dynamically generating .js files based on
the prospect that the next version of asp.net might change their rendering
of id attributes?
Insane man...
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:b8**************************@msnews.microsoft .com... Sure, of course you can make it work. I think what I was trying to say is that the pattern is what's documented to potentially change in the future, thus the preference to use the ClientID property and merge that dynamically into your javascript.
-Brock DevelopMentor http://staff.develop.com/ballen
The id is known, one can set the id on the master page, content place holder controls, etc. The pattern is always the same. I know what the final rendered id value will be and can set the proper css/javascript selectors properly ahead of time.
My problem is simply not having total control of the rendered id attributes and the verbosity of the rendered values.
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message news:b8**************************@msnews.microsoft .com...
The problem is that you don't know what some other control will emit for an ID. I imagine what your problem is is that you want to hard code the ID in your javascript to a well known value. Instead of hard coding, the approach
is to dynamically emit your javascript with the proper ID using the Control.ClientID
property.
-Brock DevelopMentor http://staff.develop.com/ballen Is there a way to prevent the INamingContainer behaviour that prefixes the id of server controls in master pages with the format [master page id]_[content id]_. I would prefer to manage the potential id attribute conflicts myself, rather than having such verbose id attributes throughout my site.
Thanks, ~PJ
Not insane; I'm simply suggesting the documented way for identifying the
ID of controls in the client. This was the documented was of doing things
in ASP.NET v1.0 and if one had followed those guildlines originally then
one's code would work going forward in v1.1 and v2.0.
-Brock
DevelopMentor http://staff.develop.com/ballen You're seriously are recommending dynamically generating .js files based on the prospect that the next version of asp.net might change their rendering of id attributes?
Insane man...
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message news:b8**************************@msnews.microsoft .com...
Sure, of course you can make it work. I think what I was trying to say is that the pattern is what's documented to potentially change in the future, thus the preference to use the ClientID property and merge that dynamically into your javascript.
-Brock DevelopMentor http://staff.develop.com/ballen The id is known, one can set the id on the master page, content place holder controls, etc. The pattern is always the same. I know what the final rendered id value will be and can set the proper css/javascript selectors properly ahead of time.
My problem is simply not having total control of the rendered id attributes and the verbosity of the rendered values.
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message news:b8**************************@msnews.microsoft .com...
The problem is that you don't know what some other control will emit for an ID. I imagine what your problem is is that you want to hard code the ID in your javascript to a well known value. Instead of hard coding, the
approach
is to dynamically emit your javascript with the proper ID using the
Control.ClientID
property.
-Brock DevelopMentor http://staff.develop.com/ballen > Is there a way to prevent the INamingContainer behaviour that > prefixes the id of server controls in master pages with the format > [master page id]_[content id]_. I would prefer to manage the > potential id attribute conflicts myself, rather than having such > verbose id attributes throughout my site. > > Thanks, > ~PJ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jo Inferis |
last post by:
(Disclaimer : I'm pretty new to .NET, so please forgive me if this isn't
100% clear)
I know Master pages are coming, but until then I've implemented a version of
the page templating solution at...
|
by: Alex Stevens |
last post by:
Hi All,
I have built a composite user web control and I've NOT implemented
INamingContainer.
It does implement IPostBackDataHandler to retrieve information entered into
the controls when the...
|
by: Natan |
last post by:
Is there any possibility to make an ASCX be loaded in an object that
does not implement INamingContainer, but mantain the funcionality of
events and etc?
I know i can`t do this using the current...
|
by: gemel |
last post by:
Interface definitions do no not contain implementation, only
signtures. That is there real purpose. Here thow we have an Inteface
which does not have any implementation code but it has to be...
|
by: Sam Samnah |
last post by:
With INamingContainer ChildControl UniqueIDs or ClientIDs are Represented
similar to the following:
ParentControlID:childControlID
Now my problem is the colon ":" used to sperate the Parent...
|
by: Sam Samnah |
last post by:
I'm having a hard time with INamingContainer.
I'm building a composite control that has a implements an HtmlGenericControl
Div control and an HtmlInputHidden control the Generic control works...
|
by: Martin Robins |
last post by:
I have a situation where I need to specify the names for some controls
without the parent INamingContainer getting in the way - this is because I
am using 2 hidden fields to pass data to another...
|
by: archana |
last post by:
Hi all,
Can anyone tell me what is use of implementing INamingContainer
interfece.
I am very much confused about this interface as it has to methods to
implement.
any help will be truely...
|
by: TS |
last post by:
Steven, i lost this message conversation from outlook express and made a
post online (see last one on this page). Please answer it as it hasn't been
yet.
thanks
The clientID of our controls...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |