0
votes

I have asp.net ajax modal popup extender in which I have placed text boxes. The text boxes are validated and the validation error messages are shown.

There is a scenario where I need to clear the validation error messages.

When I save the modal popup without entering values, validation error messages appear. Now I close the modal popup clicking on cancel button.

Next time when I open the modal popup I see the same error messages. How could I clear just the validation error messages through jquery. I don't want to disable the validators but I only need to clear the error.

1
I tried the bellow code and then it worked. Cheers! $.each(Page_Validators, function (index, validator) { $(validator).attr('style','display:none;') } ); - Shankar Das
@user1075000: You should post that as an answer. - Keith Thompson

1 Answers

0
votes

Via user10725000, who really deserves the credit:

I tried the bellow code and then it worked. Cheers!

$.each(Page_Validators, function (index, validator) { 
  $(validator).attr('style','display:none;') 
});