Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The point of ASP.Net Validation Controls

Status
Not open for further replies.

chrigil

Programmer
Sep 23, 2003
178
GB
Can someone tell me the point of using ASP.Net Validation Controls over JavaScript for instance?

As I understand it ASP.Net Validation Controls are server side and therefore it is like using ASP to validate input. Surely a client-side solution is far better. As I haven't really investigated these controls fully I'm sure I must have missed the point (I doubt vary much that the guys at Microsoft are scratching their heads saying "Y'know he's right! Why didn't we think of JavaScript" : )

Can someone just set me straight on this issue,



Thanks in advance,

Chris
 
Some of the validation controls render as JavaScript. Others don't. Sometimes it's conditional based on the intended target.

That's the supposed advantage, is that you can create a validation control that will work client-side IF the client supports, and fallback to server-side if it doesn't, without the programmer having to "worry about it".

But a GOOD progammer DOES "worry about it". I use JavaScript over ASP.NET Validation controls.



Thomas D. Greer

Providing PostScript & PDF
Training, Development & Consulting
 
It is my understanding that the ASP.Net Validation Controls actually use Javascript to perform the validation. I believe that they just use the controls to make it "easier" for people to implement validation. I could also be completely off-base here, so if someone knows better than please correct me.
 
Thanks for the answer guys. Here was me thinking I'd finally gotten one over on Bill Gates and his buddies ;)

Thanks in advance,

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top