Looking for a contract position
in Toronto area as a Senior .NET Developer
Toronto, ON, M6P 2P2
Tel: 647.328.3809
Email: 

ModalPopupExtender and "Close" button

ModalPopup control from AjaxControlsToolkit has property CancelControlID which has ID of control to close modal popup. But you can use only one control to close window using this property. If you need more controls to close the popup, you can easily add they on your page. You need to call hide() method of the control from JavaScript.
    function hidePopup() {
        var modalPopup = $find('<%=ModalPopupExtender1.ClientID %>');
        modalPopup.hide();
    }
And you need to add OnClientClick event to all controls you need to close the modal popup window.
 <asp:Button ID="Button1" runat="server" Text="Export"
  OnClick="ExportButton_Click" OnClientClick="hidePopup()" />
del.icio.us Tags: ,
 
Powered by AtomicCms content management system