Simple One

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)
 
S

sirfunusa

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.
 
E

Eliyahu Goldin

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

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top