Search code examples
asp.netajaxcontroltoolkitmodalpopupextender

How to ensure ModalPopupExtender only shows when validation is successful?


How do I setup the ModalPopupExtender to not show when the validation on the page fails? I have a RequiredFieldValidator on a textbox. On Submit, I would like to show the ModalPopupExtender ONLY if validation is successful.


Solution

  • I set it up so that I can control it on the server side. This way, I was able to run the validation first before showing/hiding the ModalPopupExtender