M
Mike Miller
I have a custom control that is a child control of another custom control.
If I do not explicitly set the ID, either in the .aspx or in code (if it is
added dynamically), no ID is rendered in the final markup.
ASP.net, of course, assigns a default ID - such as ctl001 - when the control
is created. If you access the ID, ClientID, or UniqueID, you get this value
back (along with the naming container's ID for the latter two). I would
expect that the full client ID would then be rendered to the page, regardless
of whether it was explicitly set.
However, this is not the case. Name the control explicitly and it's fine.
Let ASP.Net name it and - not so much. The ID doesn't render. Anyone have
any ideas on what I might be missing here?
Thank you.
If I do not explicitly set the ID, either in the .aspx or in code (if it is
added dynamically), no ID is rendered in the final markup.
ASP.net, of course, assigns a default ID - such as ctl001 - when the control
is created. If you access the ID, ClientID, or UniqueID, you get this value
back (along with the naming container's ID for the latter two). I would
expect that the full client ID would then be rendered to the page, regardless
of whether it was explicitly set.
However, this is not the case. Name the control explicitly and it's fine.
Let ASP.Net name it and - not so much. The ID doesn't render. Anyone have
any ideas on what I might be missing here?
Thank you.