Control's ID not being rendered

Discussion in 'ASP .Net Building Controls' started by Mike Miller, Jan 7, 2008.

  1. Mike Miller

    Mike Miller Guest

    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.
     
    Mike Miller, Jan 7, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Timo
    Replies:
    4
    Views:
    494
  2. tshad
    Replies:
    1
    Views:
    393
    tshad
    Mar 11, 2005
  3. =?Utf-8?B?c3R1ZGVuNzcx?=

    DataList not being rendered

    =?Utf-8?B?c3R1ZGVuNzcx?=, Nov 2, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    325
    Eliyahu Goldin
    Nov 2, 2006
  4. Matt Sokol
    Replies:
    2
    Views:
    409
    Theo Tillotson
    Aug 7, 2003
  5. TJ
    Replies:
    4
    Views:
    374
    Steven Cheng[MSFT]
    Apr 7, 2006
Loading...

Share This Page