473,324 Members | 1,856 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,324 software developers and data experts.

Closing the currently active window

Hi,

I popupped a new asp.net window. Within it I want to display an explicit
close button. How .Net object can I call to close this popup window
programmatically?

King

Oct 3 '08 #1
1 3470
"King Coffee" <kc*****@hotmail.comwrote in message
news:D2**********************************@microsof t.com...
I popped up a new ASP.NET window.
Please clarify what you mean by an "ASP.NET window" - do you mean a browser
window...?
Within it I want to display an explicit close button. How .Net object can
I call to close this popup window programmatically?
Assuming you do actually mean a browser window, you can't close it with .NET
because that runs server-side. You'll need to use client-side JavaScript.

<input type="button" value="Close"
onclick="window.opener=null;window.close();" />
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 3 '08 #2

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

Similar topics

5
by: Ron L | last post by:
I have an MDI application with a number of child windows. In each child window I am catching the Closing event and having the child window decide if it should set cancel to true. The intent here...
6
by: John | last post by:
Hi Is it possible to close a form through code from within itself without using the form name? I just worry that form name can change and the code will stop working. Thanks Regards
5
by: nick_faye | last post by:
Hi, I am still a newbie to VB and using MS Access 2000. I am currently trying to provide a preview of reports before printing them. My program is simple: AC.DoCmd.OpenReport "MyReport",...
22
by: alecjames1 | last post by:
I have a form which the user must complete before closing. I have disabled the window x button and use my own exit button. When selected it checks to see if the user has completed the entries...
1
by: RJN | last post by:
Hi I open a few pop-up windows from a main window. If session time out occurs in either the main window or the pop-up windows ,I redirect the user to login screen. Currently what is happening is...
0
by: vvenk | last post by:
Hello: I have an MDI application. The application has a MDI Parent and several MDI children forms. While the MDI parent makes sure that all child forms are closed before the application shuts...
2
by: Tom | last post by:
How is the best way to avoid validation when closing a window? For instance, I have a Windows Forms window which has a validation event for a text box. However, if one enters invalid data in then...
4
by: Andre | last post by:
With Firefox 1.5+, I used the following code to close a window/tab: === <html><head> <script language="javascript" type="text/javascript"> function closeWindow() { window.open('','_parent','');...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.