Explanation needed please

emvanlill

Member
Joined
Jun 25, 2003
Messages
10
Location
Ireland
Hi.
Im confused again. With this new validation controls from ASP.Net, is it not better to do your form validation on the Client-side with some script?
Can you accually do form validaton with a client-side script on ASP.Net controls, because if you do put an event on a ASP.Net control it will go to a VB runat = server routine? Hope you understand this question.

Cheers!!!
 
Actually the validation controls like RequiredFieldValidator attempt to do the client side validation first, then if the browser doesnt support JavaScript or cant do it then the validation goes server side. Put a RequiredFIeldValidation on your form and run it with a button. You will see that the error message pops up without any loading. (If you use IE, if you use any browser that doesnt support it it will be server side)
 
Remember: Validators are buggy in .net!

Try to compare TextBoxes in password mode, compare "" (empty string) with "xxx" and you get no error message...
 
Back
Top