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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s