validator control modal pop-up
-
Hi I am using a Modal Popup control which is attached to a button. However I also have a a required field validator control which is attached to a radio list. When the button is clicked and no option is chosen from the radio list the required field validator should fire, but it doesnt. It fired the modal popup and the validator fires in the background. How can I make the validator fire ahead of the modal popup? thanks!
-
Hi I am using a Modal Popup control which is attached to a button. However I also have a a required field validator control which is attached to a radio list. When the button is clicked and no option is chosen from the radio list the required field validator should fire, but it doesnt. It fired the modal popup and the validator fires in the background. How can I make the validator fire ahead of the modal popup? thanks!
In button click event set the TargetControlId of the modalpopupextender to that button. E.g.if (RequiredFieldValidator1.IsValid) { ModalPopupExtender1.TargetControlID = "Button1"; ModalPopupExtender1.Show(); } Make sure that you set the TargetControlId to some dummy id, which is hidden in design. Hope this will helpful to some extent to solve the problem.
-
In button click event set the TargetControlId of the modalpopupextender to that button. E.g.if (RequiredFieldValidator1.IsValid) { ModalPopupExtender1.TargetControlID = "Button1"; ModalPopupExtender1.Show(); } Make sure that you set the TargetControlId to some dummy id, which is hidden in design. Hope this will helpful to some extent to solve the problem.
The problem is I cant seem to reference the controls in the backend code. When I try the above I get the error message 'AtlasControlToolkit.ModalPopupExtender' does not contain a definition for 'TargetControlID' Even though my control works fine in the front end code thanks anyway
-
The problem is I cant seem to reference the controls in the backend code. When I try the above I get the error message 'AtlasControlToolkit.ModalPopupExtender' does not contain a definition for 'TargetControlID' Even though my control works fine in the front end code thanks anyway