Every web application is a collection of web pages and every web pages is the collection of controls and these controls need to be validation before they are submitted to Server.
What is Validation?
- The process of checking proper input for application or page is called validation.
Where the Validation is performed ?
- Normally we performed the Validation in Client Side using JavaScript. But by using JavaScript to validate the Fields in client Side then it is time consuming to develop in JavaScript and complex.
- But we can perform the validation in server side also by using app.net controls.
- In Dot Net provides the mainly 6 types of Validations controls
- Required Field Validation
- Range Validation
- Compare Validation
- Custom Validation
- Dynamic Validation
- Regular Expression Validation
How asp.net Validation Controls will work ?
- When user makes a request to web page where a validation control is present.
- Then a validation controls generates Server side code and also client side code.
- From the server form that is HTML and JavaScript will be sent to client
- in client when the user completes the inputs with acceptance from JavaScript code that is client side code then it will go to server and performs same validation at server
Why Validation is performed in two places (Client Side & Server Side)
When data is validated and submitted to server there a possibility of malfunctioning our values that is why validation is repeated at server side.
So By using asp.net Validation controls .it takes too much time to validate and burden on server but if the client "Off's the JavaScript in Browser setting" then the java files never work on website so indirectly we depend on asp.net controls
No comments:
Post a Comment