JeepGeekin
asked on
Popup close & redirect
If I run into an error in a popup while processing VB.Net code on page_load, how can I redirect the main window that opened the popup to an error page and close the popup window? I'm not having much luck doing this from VB.net (2005 if it matters).
ASKER
Thanks. Sorry. I moved on to another problem & forgot I posted this.
Rejo. To test it, I added your code to the Page_Load of an aspx popup page & called the popup page from another page.
What happened was that the popup closed, but the page that called it didn't do anything. I can's say I follow this enough to troubleshoot it. I guess Parent in a popup window is the calling page. Does anything else need to be done here between these 2 pages? I'll bump this up 100 points.
SystemExpert, thanks, but that link didn't help me. It was for opening a popup from another popup & redirects within the popup window.
Rejo. To test it, I added your code to the Page_Load of an aspx popup page & called the popup page from another page.
What happened was that the popup closed, but the page that called it didn't do anything. I can's say I follow this enough to troubleshoot it. I guess Parent in a popup window is the calling page. Does anything else need to be done here between these 2 pages? I'll bump this up 100 points.
SystemExpert, thanks, but that link didn't help me. It was for opening a popup from another popup & redirects within the popup window.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
That did it. Thanks!
Dim scriptString As String = "<script language=JavaScript> parent.document.location.h
scriptString += "window.close();"
scriptString += "</script>"
Me.RegisterClientScriptBlo
Rejo