Can I prevent RequiredFieldValidation from enforcing postback from a specific control

I have a web form with several text field controls that I have linked RequiredFieldValidator to. I have a ValidationSummary element on the page to display any incomplete fields when the page is submitted.

However, I just need to add the image uploader to the same page and create the upload button that I submit to upload. I don’t want this download button to call RequiredFieldValidators for the rest of the page, though - I want this download postback to be ignored as the check passes.

What is the best way to disable RequiredFieldValidator when sending this download button to a page, because at the moment the download will not happen if I did not fill out all the other text box controls on the page.

+3
source share
2 answers
+9
source

,

0

Source: https://habr.com/ru/post/1747165/


All Articles