View Single Post
  #2 (permalink)  
Old January 6th, 2014, 10:02 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,038, Level: 100
Points: 72,038, Level: 100 Points: 72,038, Level: 100 Points: 72,038, Level: 100
Activity: 50%
Activity: 50% Activity: 50% Activity: 50%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,080
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

Take a look at this:

ClientIDMode="Static"

You set the ClientIDMode to static which means ASP.NET changes the way IDs are rendered. In the article, I mention the ClientIDMode and then show the code you need to use instead (which is much simpler):
Code:
var userNameTextBox = $get('UserName'); 
var userNameRequiredMessage = $get('UserNameRequired');
So either get rid of the ClientIDMode, or use this simpler code instead. The article has full details on this.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
pitters (January 9th, 2014)