0

i am using validator for validating blank textbox. my problem is,i want to make the validation to false means the textbox can be blank,when i select Complete from dropdownlist.

How can i do this.

1
  • You can do this thing through your code.If you are interested so i can send a code. Commented Aug 27, 2010 at 5:38

2 Answers 2

2

You can disable an ASP.NET validator using JavaScript. Tap into the onchange JavaScript event on your drop down list to invoke the disabling code, and that should do it.

Alternatively, if your combo box is posting back, you can disable or hide the validator in code behind by setting its Visible or Enabled property to false.

Sign up to request clarification or add additional context in comments.

1 Comment

+1 Disabling validators using javascript makes better UI experiences & performance.
0

Handle it in the dropdownlist change event, set the Enabled property of the validation control to false.

Or thru JavaScript set the validation control enabled to false. Note: Validation control must be set to EnableClientScript=true.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.