I'm using Microsoft AjaxControlToolkit for modal popup window.
And on a modal popup window, when a postback occurred, the window was closing. How do I prevent from the closing action of the modal popup?
Put you controls inside the update panel. Please see my sample code, pnlControls is control that holds controls that will be displayed on popup:
<asp:Panel ID="pnlControls" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="TestButton" runat="server" Text="Test Button" onclick="TestButton_Click" />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
This will do the job for you :)
Best regards, Gregor Primar
You can call Show()
method during postback to prevent the modal popup window from closing
MyModalPopoupExtender.Show()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With