This is very common question for any interviewer .
Validation means data should be in correct state for example a Email column should have only email value in appropriate format otherwise it wont be validate email. Thus we need to perform some validation for every data.
Now question arise what is client side and server side validation and which one is better ?
Client Side Validation : client side validation are performed by client side programming language such as javascript , vbscript , html5 , jquery etc.
these validation are performed using HTML control as well as ASP control .
Client side validation is the validation which is processed by the browser before the form submitted to the server and when there is no requirement of server to process the data we use client side validation.
for example in a form there is a column "Enter Name " and user does not enter any name into "Enter Name" column then validation can be performed & for just checking whether name is enter or not
we do not need to server process the data. So it can be directly performed by Browser thus we use client side control for faster processing.
Client side control does not require post back.
Server Side Validation : server side validation are performed by server side scripting language such as
ASP.NET and PHP etc.
server side validation are generally use when there is a requirement to process through the server .
for example Username and Password validation can not be check at client side by browser because
to check username with the proper password we need to database and it always reside on database server . Thus there input submitted by the user is being sent to server to validate password.
after validation process on server side the result is sent back to client side to the browser.
Server side validation is time consuming then client side validation . because client side are directly
performed by browser where as server side validation performed by the server & then feedback sent back to browser.
Client Side and Server Side Control ..
Validation means data should be in correct state for example a Email column should have only email value in appropriate format otherwise it wont be validate email. Thus we need to perform some validation for every data.
Client Side Validation and Server Side Validation
Now question arise what is client side and server side validation and which one is better ?
Client Side Validation : client side validation are performed by client side programming language such as javascript , vbscript , html5 , jquery etc.
these validation are performed using HTML control as well as ASP control .
Client side validation is the validation which is processed by the browser before the form submitted to the server and when there is no requirement of server to process the data we use client side validation.
for example in a form there is a column "Enter Name " and user does not enter any name into "Enter Name" column then validation can be performed & for just checking whether name is enter or not
we do not need to server process the data. So it can be directly performed by Browser thus we use client side control for faster processing.
Client side control does not require post back.
Server Side Validation : server side validation are performed by server side scripting language such as
ASP.NET and PHP etc.
server side validation are generally use when there is a requirement to process through the server .
for example Username and Password validation can not be check at client side by browser because
to check username with the proper password we need to database and it always reside on database server . Thus there input submitted by the user is being sent to server to validate password.
after validation process on server side the result is sent back to client side to the browser.
Server side validation is time consuming then client side validation . because client side are directly
performed by browser where as server side validation performed by the server & then feedback sent back to browser.
Client Side and Server Side Control ..
Great Blog!!! Thanks for sharing this wonderful blog with us.
ReplyDeletePython Online Course
Python Training in Chennai
Python Training in Coimbatore
Thanks for feedack
Delete