J
JW
I have a WebControl, lets call it WebC. WebC has a Label control, with
an ID of TheLabel. I have a UserControl, lets call it UserC. I drop
WebC onto UserC; WebC has an ID of "WebC1" and the Label on WebC1 now
has an ID of "WebC1_TheLabel". I drop UserC onto a page; UserC has an
ID of "UserC1" and the Label on WebC1 now has an ID of
"UserC1_WebC1_MyLabel". From within the WebC code, there is an area
that writes the Label control's ID [e.g. this.Attributes.Add(
"onmouseover", "jsfunction('" + this._theLabel.ID + "');"]. Okay, so
when the control renders the onmouseover event SHOULD look something
like this:
onmouseover="jsfunction('UserC1_WebC1_MyLabel');"
But instead it comes out like this:
onmouseover="jsfunction('WebC1_UserC1_MyLabel');"
It reverses WebC1 with UserC1 in the naming container. Why does this
happen and how do you correct it?
-James
an ID of TheLabel. I have a UserControl, lets call it UserC. I drop
WebC onto UserC; WebC has an ID of "WebC1" and the Label on WebC1 now
has an ID of "WebC1_TheLabel". I drop UserC onto a page; UserC has an
ID of "UserC1" and the Label on WebC1 now has an ID of
"UserC1_WebC1_MyLabel". From within the WebC code, there is an area
that writes the Label control's ID [e.g. this.Attributes.Add(
"onmouseover", "jsfunction('" + this._theLabel.ID + "');"]. Okay, so
when the control renders the onmouseover event SHOULD look something
like this:
onmouseover="jsfunction('UserC1_WebC1_MyLabel');"
But instead it comes out like this:
onmouseover="jsfunction('WebC1_UserC1_MyLabel');"
It reverses WebC1 with UserC1 in the naming container. Why does this
happen and how do you correct it?
-James