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.
views:
296answers:
2
A:
It should be fairly straightforward. In your Page_Load or PreRender code, try something like this:
if (Page.IsValid)
{
myModalExtender.Show();
}
womp
2010-03-17 16:25:03
The ModalPopupExtender by default shows on the client side when the control specified by the TargetControlId is clicked
DotnetDude
2010-03-17 16:30:34
A:
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
DotnetDude
2010-03-19 12:52:36