473,403 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

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


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?
Nov 18 '05 #1
1 1371
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!
************************************************
"Ryan Ternier" <rt******@icompasstech.com.spamproof> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...

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?

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: mg | last post by:
Once opening WebForm2 from WebForm1 using Response.Write("<script language='javascript'>window.open ('WebForm2.aspx','two','menubar=no');</script>"); how can I close WebForm1?
0
by: Vam$y | last post by:
In asp.net how to catch window close event when a user closes the window explicitly by clicking on “x” button which is on the right top corner of the browser. My requirement is When a user...
37
by: Jan Tovgaard | last post by:
Hey everyone:) We have a critical problem, which I can see that other people also has ran into. In Internet Explorer 7 it is no longer possible to do a window.close after opening a window,...
2
by: Garg | last post by:
Hi, If anybody could tell me what the equivalent of window.close() in vb.net?? Thanks,
15
by: Mahernoz | last post by:
Hi Friends, I simply want to print a report by opening a popup, calling the print function and closing the window after the user has printed the report. I have 2 functions.... in c# The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.