A
aaron
Hi All,
I have a custom web control which works perfectly. Its just a
tabcontrol to spit out navigation tabs, it inherits from
System.Web.UI.WebControls.WebControl
In web page design view, say I give the control an ID of "tab1".
I am getting this weird and very frustrating behaviour:
When the page is rendered, i.e. if you go "View Source" from the
browser, the next server control placed on the page after the "tab1"
control, ends up with two IDs. The first ID is "tab1" (somehow
incorrectly carried over from the "tab1" control above it), and the
second ID is the control's correct ID which it should have, i.e.
"pnlSearch" or something.
In my case, its a Panel that's copping the extra incorrect ID, but I've
tried removing the panel and replacing it with any other server
control, i,e, an <asp:Label> or anything, and as long as its the next
control straight after my "tab1", it ends up having an id="tab1" added
to it incorrectly!
So the panel looks like this when rendered:
<div id="tab1" id="pnlSearch">
I'm using a lot of CSS, so this multiple ID rubbish is causing me some
grief.
I'm pretty certain something could be not quite spot on with the custom
TabControl. When I remove it, the problem goes away. Its almost like
the TabControl is leaving some variable set with its ID in it, and the
next server control is picking that up and using it, but it needs to be
cleared or something..
Thanks for any insight into this..
Aaron.
I have a custom web control which works perfectly. Its just a
tabcontrol to spit out navigation tabs, it inherits from
System.Web.UI.WebControls.WebControl
In web page design view, say I give the control an ID of "tab1".
I am getting this weird and very frustrating behaviour:
When the page is rendered, i.e. if you go "View Source" from the
browser, the next server control placed on the page after the "tab1"
control, ends up with two IDs. The first ID is "tab1" (somehow
incorrectly carried over from the "tab1" control above it), and the
second ID is the control's correct ID which it should have, i.e.
"pnlSearch" or something.
In my case, its a Panel that's copping the extra incorrect ID, but I've
tried removing the panel and replacing it with any other server
control, i,e, an <asp:Label> or anything, and as long as its the next
control straight after my "tab1", it ends up having an id="tab1" added
to it incorrectly!
So the panel looks like this when rendered:
<div id="tab1" id="pnlSearch">
I'm using a lot of CSS, so this multiple ID rubbish is causing me some
grief.
I'm pretty certain something could be not quite spot on with the custom
TabControl. When I remove it, the problem goes away. Its almost like
the TabControl is leaving some variable set with its ID in it, and the
next server control is picking that up and using it, but it needs to be
cleared or something..
Thanks for any insight into this..
Aaron.