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: asp.NET, ajax
|