Hi, This might be simple to fix, but has me baffled.
I am using ASP.NET 2.0 and one of my aspx pages uses RegisterStartupScript to launch a popup window aspx page. The popup works fine but what happens is that the original launch pages get's redrawn again. For the user to go back to the page before the launch page now they need to cross both the duplicate launch page and the orignal launch page. I need to avoid the duplicate start page.
Here's a sample of my code:
During the code behind handling of the button clicked event, after some needed processing I call:
Page.RegisterStartupScript("Pop", GetOpenNewWindowString("PopupDisplay.aspx", "pdisplay"));
And here's the method which generates the java script string:
private string GetOpenNewWindowString(string url, string windowName)
string features = "status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes";
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append(" window.open('" + url + "', '" + windowName + "', '" + features + "');\r\n");
Am I overlooking something simple? The problem occurs both in IE and Fire Fox.