Add this to the aspx file
<script type="text/JavaScript">
var childWindow = null;
function openWindow(windowUrl)
{
if ( childWindow != null && childWindow.closed == false)
{
childWindow.close();
childWindow = null;
}
childWindow = window.open(windowUrl, 'CustomPopUp', 'width=800, height=600,statusbar=yes ,scrollbars=yes, menubar=no, resizable=yes')
}
</script>"
Change your script rendering in the CodeBehind file to:
Dim javaScript As String = "<script type=text/JavaScript>openWindow('" + ConfigurationManager.AppSettings("ActionTypeURL4") + '");</script>"
RegisterStartupScript("OpenWindowScript", javaScript)
Note that RegisterStartupScript has changed since version 1.1 and you will get a compiler warning with the above. See http://msdn2.microsoft.com/en-us/library/system.web.ui.clientscriptmanager.aspx for more info.
Also note that if a PostBack occurs, you will lose your window refernce and this will not work.
NC...