ClientId of a user control too long

Last post 11-10-2006 12:40 AM by cklein. 3 replies.

Sort Posts:

  • ClientId of a user control too long

    08-29-2006, 1:18 AM
    • Member
      70 point Member
    • mike.cao
    • Member since 05-28-2006, 6:54 AM
    • Posts 15

    Hi there

            I am using some user controls, the clientid will be something like this "ctr1_ctr2_Feedback_plBody_imgHelp", I understand this is by design to ensure the client id is unique in the client side, but I mean, it's too long, especially i use user control nested, sometime 20% page size was the IDs, so is there some way i can do to reduce the length of the id?

     

    Thanks

    Mike
     

     

  • Re: ClientId of a user control too long

    08-29-2006, 1:26 AM
    Answer
    • All-Star
      30,697 point All-Star
    • StrongTypes
    • Member since 12-13-2005, 4:21 PM
    • California
    • Posts 6,007
    • ASPInsiders
      Moderator
      TrustedFriends-MVPs

    There's really nothing you can do about the client ID.

    Ryan

    Ryan Olshan
    ASPInsider | Microsoft MVP, ASP.NET
    http://ryanolshan.com

    How to ask a question
  • Re: ClientId of a user control too long

    08-29-2006, 1:43 AM

    Hi Mike,

       one way is creating custom controls which extends the stardard controls and overidding the ClientID and UniqueID for them,

       see http://west-wind.com/weblog/posts/4605.aspx

  • Re: ClientId of a user control too long

    11-10-2006, 12:40 AM
    • Participant
      1,555 point Participant
    • cklein
    • Member since 06-19-2002, 9:55 PM
    • Los Angeles
    • Posts 343

    Don't mislead others. It will never work for him.

     

     

    Dragon.X.Dragon:

    Hi Mike,

       one way is creating custom controls which extends the stardard controls and overidding the ClientID and UniqueID for them,

       see http://west-wind.com/weblog/posts/4605.aspx

    Live by a Better Code

    http://www.raincoder.com

    Equal parts art and science

    Email: cguo@raincoder.com

Page 1 of 1 (4 items)