L
Lloyd Burley via .NET 247
Hoping someone here can help me.
I'm trying to change the ID that gets rendered to the browser for a
server side control
Example:
<aspanel id="Panel5" runat="server">test</aspanel>
Renders as:
<div
id="_PageTemplate0_innerHolder__PageTemplate7_ProfileOptions_Panel5">t
est</div>
what I'd like to do is change the ID of the div or any other control
back to it's original value(possibly using the ClientID attribute?),
in this case Panel5. I would like this to happen ONLY if i haven't
set a cssclass on the control, that way I can track which I know to
be unique controls to a page and which aren't.
I would like to use this method for 2 reasons.
1. I use the ID's of controls for CSS layout of unique controls and
classes for non-unique controls.
2. I use a nested control template architecture which is a few levels
deep, as can can probably see, the ID that is output to the browser
is ugly and bloated and not in the spirit of the clean HTML I and my
company try to employ.
If anyone can help me out with this I'd be grateful
I'm trying to change the ID that gets rendered to the browser for a
server side control
Example:
<aspanel id="Panel5" runat="server">test</aspanel>
Renders as:
<div
id="_PageTemplate0_innerHolder__PageTemplate7_ProfileOptions_Panel5">t
est</div>
what I'd like to do is change the ID of the div or any other control
back to it's original value(possibly using the ClientID attribute?),
in this case Panel5. I would like this to happen ONLY if i haven't
set a cssclass on the control, that way I can track which I know to
be unique controls to a page and which aren't.
I would like to use this method for 2 reasons.
1. I use the ID's of controls for CSS layout of unique controls and
classes for non-unique controls.
2. I use a nested control template architecture which is a few levels
deep, as can can probably see, the ID that is output to the browser
is ugly and bloated and not in the spirit of the clean HTML I and my
company try to employ.
If anyone can help me out with this I'd be grateful