Simple One

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hit a button and it does some stuff and closes the browser window.

The last part is what i need help on. Closing the browser window

(the "stuff part is nearly 6 pages and finally almost over)
 
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Response.Write("<script>window.close();</script>")
End Sub

Sorry, I don't believe you can supress the dialog that comes up.
 
Actually, you can:

Response.Write("<script>window.opener=null;window.close();</script>")

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Sneaky Cryptocurrency Mining 2
Cookies 5
Windows 7 to 10 Upgrade 6
Windows 11 Windows 11 update 5
PC very slow after un-installing software 4
Multi-Threading 6
Broken HTML Tags on Web Page 1
Prevent browser close 6

Back
Top