In my previous article, We have implemented to check username availability in ASP.NET Web Forms using jQuery Validation Plugin. In this article, we will do same thing in ASP.NET MVC, but using AngularJS(An open-source MV* JavaScript framework for building dynamic web apps).
Tag: client side validation
Username Availability Check in ASP.NET Web Forms with jQuery Validation Plugin
Dynamically Enable or Disable ASP.NET Validator and Page.IsValid
In my post, I discussed different client side APIs and Methods of asp.net validator Controls. Now suppose if you have customized validation on client side, what’ll happen on server side? We need to do same on server side. Let’s understand this step by step by taking same example. Suppose you have to disable password’s requiredfieldvalidator when ‘Allow me‘ checkbox is true. You have disabled validator on checkbox click using ValidatorEnable javascript method. Now on server side button click, if you validate and check for isValid, it is always false and you will see error message in validationsummary even if checkbox is checked. Client side bypasses validation but on server side it’s stucked and our object is defeated.
Client Side Validation using ASP.NET Validator Controls from Javascript
ASP.NET validation controls provide functionality to perform validation using client script. By default, when client-side validation is being performed, the user cannot post the page to the server if there are errors on the page thus the user experience with the page is enhanced.