Which is best — client-side validation or server-side validation?
For security:
Server side validation.
A savvy client can remove the validation.
For best GUI experience:
Client side validation.
You MUST do server side validation. Otherwise anyone can send anything they like (consider browser with JavaScript disabled, or a custom fake browser).
Client site validation can be used to provide a better user experience, but you should operate correctly if it is not available.
Server side validation is a must since client side validation can be tampered. However, client side validation usually provides a better user experience, since it requires less post backs. So I would recommend using both.
For the validation purpose in asp.net both are goods but, its depends on the application ,for the security purpose the server side validation is best but it increases a overhead on server, so we generally avoid to use the server side validation when ever it is not necessary.
The Client side validation is best generally input for checking the input type parameter and it check on the client side means at your browser so it does not puts a load on the server and less time taken and insecure.
In my point of view Client side validation is best.