Tip : Why we should call Page.Validate() and check Page.IsValid even with client side validation?

July 22, 2008 09:19 by Chandana

From end user perspective, client side validation is absolutely giving better user experience with UI. But, technically who can trust the user inputs? Because JavaScript is the key player behind the client side valuation and also anyone can bypass the JavaScript by disabling it. Not only that, brilliant hacker can swap the JavaScript validation functions through automated process.

Solution with ASP.NET 2.0:

 

 

 

 

 

 
When Page.Validate() is fired, it automatically check the CausesValidation = True controls and return the page validation status through Page.IsValid() property. Here you have another option to call Page.Validate() method for specific validation group and get the status.

FYI: Don’t forget to call Page.Validate() before the checking Page.IsValid().


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Related posts

Add comment


(Will show your Gravatar icon)  

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

September 7. 2008 14:40