I'm using Microsoft AjaxControlToolkit for modal popup window.
And on a modal popup window, when a postback occured, the window was closing. How do i prevent from the closing action of the modal popup?
I'm using Microsoft AjaxControlToolkit for modal popup window.
And on a modal popup window, when a postback occured, the window was closing. How do i prevent from the closing action of the modal popup?
You can call Show() method during postback to prevent the modal popup window from closing
MyModalPopoupExtender.Show()
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack)
{
// reshow
MyModalPopup.Show()
}
}
i guess that works but not in my case. i have a user control that opened in a modal popup and this user control makes postback itself. so in that user control i have no modal popup property.
i guess, i have to create an event for my user control, and the page that opens the modal popup have to reopen it in this event.
Hello,
Like you prolly already know, the modal popup is clientside only, yeah you can gather informations in it during the postback, but if you do a postback he will hide 100% of the time.
Of course, like other proposed, you can do a .show during the postback, but it depends on what you need to do.
Actually, I don't know why you need a postback, if it's for some validations try to do them clientside.
Could you tell us why you need to do a postback, maybe we could help you better ! :)