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?
mike.cao
Member
70 Points
15 Posts
ClientId of a user control too long
Aug 29, 2006 05:18 AM|LINK
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
StrongTypes
All-Star
30801 Points
6013 Posts
ASPInsiders
Re: ClientId of a user control too long
Aug 29, 2006 05:26 AM|LINK
There's really nothing you can do about the client ID.
Ryan
Dragon.X.Dragon
Contributor
2600 Points
512 Posts
Re: ClientId of a user control too long
Aug 29, 2006 05:43 AM|LINK
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
cklein
Participant
1561 Points
357 Posts
Re: ClientId of a user control too long
Nov 10, 2006 04:40 AM|LINK
Don't mislead others. It will never work for him.
http://www.raincoder.com
Equal parts art and science
Email: cguo@raincoder.com