0
votes

I have a form with the following controls

  1. textbox for emailId -txtEmail
  2. textbox for aboutme- txtAbout
  3. submit button -btnSubmit

I'm using requiredfieldvalidators and reqularexpression validators for both the text fields. I need to do serverside validations. So I've set EnableClientScript to false.

txtAbout and btnSubmit should be disabled if txtEmail is either empty or invalid. How do I fire the validation for this?

Also, if I'm asked to do Server Side validation, should I EnableClientScript to false, 'coz I read somewhere that even if is set to true, server side validation will fire.

1

1 Answers

0
votes

txtAbout and btnSubmit should be disabled if txtEmail is either empty or invalid. How do I fire the validation for this?

In order to implement this, according to my understanding you need to do client side validation. At client side you can use key press/Up events and you can use regular expressions i.e. RegExp in the javascript to validate the Email address textbox...and the corresponding underneath controls can be Enabled/Disabled on the basis of Email validation.