Control's ID not being rendered

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top