How do you do validations. Whether client-side or
server-side validations are better ?

Answer Posted / abhishek kumar

Server side validation is always better option to have
safe side due to the following resons.

i) Client side script is always a security risk and in many
case it is not allowed, and for the same reason JavaScript
that is behind nearly all client side validation could be
turned off in web browser.

ii) Validation that requires a database only server side
validation is better option.

iii) Keeping all validation code at one place.

To minimise trips that user has to face in the case of
server-side validation it will be better option to validate
all input fields at once when they are submitted to server
and returning back a single error message for all invalid
entries.

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define authentication and authorization.

623


What language is asp.net written in?

528


What is the difference between web config and machine config files?

563


How do you declare static variable?

561


Describe the application event handlers in ASP.NET?

550






Explain security types in asp.net?

543


What is the life cycle of web page?

524


How does windows service lifecycle differ from a .standard. Exe?

515


Where is cookie used in asp.net?

576


Define web.config in .net?

639


What are the disadvantages of using session?

474


What is the difference between response.redirect and server.transfer?

536


What are query strings used for?

531


How do I send an email message from my ASP.NET page?

534


What r the asp.net list controls and difference between them?

508