IMHO you should use both client and server validation.
Client to provide user with useful info and to not to post values with obvious error.
Server to protect your system from malicious data may be send by the client.
You can use .Net Validation controls for both, so no need of extra JavaScript...In any case do not try to write the validation alone - it can be a bit too complicated...
Learning material:
http://msdn.microsoft.com/en-us/library/debza5t0(v=vs.100).aspx[
^]
http://jqueryvalidation.org/[
^]