Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
All-Star
78956 Points
13402 Posts
MVP
Apr 07, 2012 10:13 AM|LINK
Even easier way is to use jQuery Wild Card selectors. With Wild Card selector you don't need to worry about the changing ids
$("[id*=UserNameLabel]").html("Your text to be set");
Ref: http://jqueryfaqs.com/Questions/Find-and-select-ASP.Net-Server-Controls-like-Button-TextBox-and-DropDownList-using-jQuery.aspx
mudassarkhan
All-Star
78956 Points
13402 Posts
MVP
Re: how to set a labels text
Apr 07, 2012 10:13 AM|LINK
Even easier way is to use jQuery Wild Card selectors. With Wild Card selector you don't need to worry about the changing ids
$("[id*=UserNameLabel]").html("Your text to be set");
Ref: http://jqueryfaqs.com/Questions/Find-and-select-ASP.Net-Server-Controls-like-Button-TextBox-and-DropDownList-using-jQuery.aspx
Contact me