Asp.net - Show popup from popup

In my asp.net application, one of the web pages has a small popup (say PopUp1) containing a hyperlink. Now, when the user clicks on this link, I need to open another popup window (say, PopUp2), but in the parent window, where the original PopUp1 is located. Also, FYI, PopUp2, which I want to show, is now a user control that I declared in PopUp1.

If I call below script from PopUp1,

PopUp2.cs public void ShowEmailPreviewPopup() { ScriptManager.RegisterStartupScript(ctlEmailPreviewUpdatePanel, ctlEmailPreviewUpdatePanel.GetType(), "ShowEmailPreviewPopup", "EmailPreviewPopup.Show();", true); ctlEmailPreviewUpdatePanel.Update(); } 

it displays the user control in the PopUp1 window, which I don't want. How to change a script so that it opens PopUp2 in the parent window of PopUp1?

Or any other ideas?

Thanks!

+4
source share
1 answer

Have you tried setting a different window name for popup 2 so that the first popup is not reused? FYI popups are usually a bad idea (blockers, etc.). If you can change the code to use the DHTML dialog, for example the jQuery UI dialog box http://jqueryui.com/demos/dialog/

0
source

Source: https://habr.com/ru/post/1346228/


All Articles