Close a Pop up window with ASP.NET (VB)

R

Ryan Ternier

I have a pop-up window that I'm closing when a user presses a submit button.
The page we're creating is not supposed to use any .NET controls.

All the HTML is output through a single string to the page, using

<% = body() &>

When it comes time to close, i'm using this simple snippet:
Response.Write("<script>window.close();</script>")
Response.Flush()
Which flushes the script, and runs it right away, which is what we want, but
it seems... messy. Is there another trick to accomplish this? Can you make
a direct call to othe unload event?
 
C

Cowboy \(Gregory A. Beamer\) [MVP]

Unfortunately, no. You have to work with client side script to close on the
client.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
 

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
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top