You can set OkControlID
property of extender to hide popup on Ok button click and OnOkScript
property for custom javascript function which will force postback from Ok button (modal popup extender prevents postback from Ok and Cancel controls).
<script type="text/javascript">
function doExport() {
__doPostBack("<%= ExportPromptOkButton.UniqueID %>", "");
}
</script>
<ajaxToolkit:ModalPopupExtender
runat="server"
ID="ExportPromptModalPopupExtender"
BackgroundCssClass="modalBackground"
TargetControlID="ExportButton"
PopupControlID="ExportPromptPanel"
PopupDragHandleControlID="ExportPromptPanelHeader"
CancelControlID="ExportPromptCancelButton"
OkControlID="ExportPromptOkButton"
OnOkScript="doExport"
Drag="true">
</ajaxToolkit:ModalPopupExtender>