subject: Email, Username, Password, Url Validation Using Jquery [print this page] Email, UserName, password, URL Validation using JQuery in Asp.net.
In this Article we will see Some useful validation Using JQuery in asp.net using Jquery Validation Plug-in must be useful for Login page or User Registration page etc..
We will also see how to perform validation in a asp.net web page which uses master page.
As we know that JQuery is a javascript library and using thins we can able to write some like animation, Validation using minimum code.
Lets Start with first with a page which does not uses Master Page and later in this article we will see JQuery Validation with Master Page.
Step 1 : Download the JQuery Plug in from Here and JQuery Validation Script Plug-in From here both are .js file.
Step 2 : Add the above file reference in your asp.net web page under
To Decorate error message generated by Jquey you can use css like this and you can add this your custom css file you inside Head Tag
1
2label.error { color: red; vertical-align: top; }
3
What is the Difference Between Asp.Net Validation control and jQuery Validation and which one good.
Well the difference is Asp.net validation control will execute both in Client and server side if javascript is disabled than validation control will fired in server side where as JQuery plug-in is based
on javascript and so will will fire in client side. Now if up to you which on you should use.
jQuery Plug in is tested on IE, Firefox, Safari, Chrome and most other popular browser.
Hope this will help all to understand JQuery Validation in your asp.net web page.
If you run the sample project attached below and run it you will see JQuery validation result like this
You can download the sample code used in above example.