How do I close an ASP.NET browser window in a SUB

xSsx

New Member
I am using ASP.NET / Visual Basic, I need to run a SUB and if it completes successfully I need to close the window and refresh the window opener. Any ideas on how to do this?<BR><BR>WayneYou will need to either response.write javascript or assign javascript to a literal.<BR><BR>literal1.text = "<script language="javascript">window.close;window.opener.location.reload(); </script>"<BR><BR><asp:Literal id="Literal1" runat="server"></asp:Literal><BR><BR>would do the trick, then when the page is done posting back(your sub is complete) the javascript will run.
 
Back
Top