Tag Archives: hide modal popup

Modal Popup Extender

 To hide a modal popup control (Ajax control toolkit may 2009 release), the below JavaScript code can be used. Instead of using OK control ID or OK script, this JavaScript code can be used in the  

 oncllientclick event of any control.  

  $find(‘mdlpopup’).hide();return false <asp:ImageButton ID=”imgbtnCancel” runat=”server” ImageUrl=”Images/cancel.gif”CausesValidation=”False” OnClientClick=”$find(‘mdlpopup’).hide();return false;” />   

 

While using a popup control extender, hiding it from server side sometimes gives an error. 

To avoid this use the popupcontrolextender.Cancel() event from server side. Often the control is rendered with

Server side code making it less possible to write client side scripts to hide it.

Advertisements