I'm trying to get a sequence of things to happen in the correct order, but no luck. What I have is a number of fields with asp:ReuiredFieldValidators and asp:ValidatorCallout to display validation messages. This is triggered with a button Save with validation="true".
If all validates, it should display a modal dialog asking for two choises on how to save the data. No matter the answer, it should always continue at this stage to code behind save function.The AjaxToolkit_ModalPopupExtender is connected to the same save button.
What happens is that the validation callouts and modal dialog is shown at the same time.
Searched for tips and help but haven't found any, for me, helpful! Most grateful for any help!
Cheers /Johan
You can show the
ModalPopup
from codebehind(inBtnSave.Click
-handler) if the page is valid:Therefor you need to set the
TargetControlID
of theModalPopupExtender
to a hidden button:You must move to Code Behind only when the Page is validated in client side. You can do it using
OnClientClick
of button