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

Closing an ASP.NET application

RML
Hi all,
I have an ASP.NET application that starts up with a HTML page containing 2
frames. The top frame is an aspx page with a "Close" button. The bottom
page is an aspx page which displays some data from an Access database.

I would like to close IE by pressing the close button in the top frame,
however I have not been able to to so. I have tried a Server side button
with "Response.End()" and a Client side bytton with Javascript
"window.close()".

Any suggestions?

Mark

Nov 18 '05 #1
2 1197
You don't have to do this in the code behind.
Just use client script.
I bet your problem i that you just wirte window.close() -- the frame is
considered to be a window and you can't close a frame, you'll have to close
the parent (browser) window.

I think this will work:

<script language="javascript">
function closeWindow()
{
self.parent.close();
}
</script>

<input type="button" onclick="closeWindow()" value="close">

cheers,
mortb

"RML" <RM*@discussions.microsoft.com> wrote in message
news:BC**********************************@microsof t.com...
Hi all,
I have an ASP.NET application that starts up with a HTML page containing 2
frames. The top frame is an aspx page with a "Close" button. The bottom
page is an aspx page which displays some data from an Access database.

I would like to close IE by pressing the close button in the top frame,
however I have not been able to to so. I have tried a Server side button
with "Response.End()" and a Client side bytton with Javascript
"window.close()".

Any suggestions?

Mark

Nov 18 '05 #2
RML
Thanks mortb, that worked great.

Mark

"mortb" wrote:
You don't have to do this in the code behind.
Just use client script.
I bet your problem i that you just wirte window.close() -- the frame is
considered to be a window and you can't close a frame, you'll have to close
the parent (browser) window.

I think this will work:

<script language="javascript">
function closeWindow()
{
self.parent.close();
}
</script>

<input type="button" onclick="closeWindow()" value="close">

cheers,
mortb

"RML" <RM*@discussions.microsoft.com> wrote in message
news:BC**********************************@microsof t.com...
Hi all,
I have an ASP.NET application that starts up with a HTML page containing 2
frames. The top frame is an aspx page with a "Close" button. The bottom
page is an aspx page which displays some data from an Access database.

I would like to close IE by pressing the close button in the top frame,
however I have not been able to to so. I have tried a Server side button
with "Response.End()" and a Client side bytton with Javascript
"window.close()".

Any suggestions?

Mark


Nov 18 '05 #3

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...
2
by: Ron L | last post by:
I have an MDI application which opens a number of child windows, each of which could have data in a state that needs to be saved. Each child window catches its Closing event and cancels it if the...
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: Chris Bruce | last post by:
In my application I need a way to distiguish between the following events: 1. When a user closes an MDI child window. 2. When the user closes the MDI parent window which subsequently closes the...
1
by: Chirag Malvi | last post by:
hello all, I am developing the web application using ASP.net and VS.2003 IDE. here is the situation which i want to implement. 1) User is browsing some webform. I want to trap this event....
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
3
by: Oenone | last post by:
I'm writing an application with various MDI child forms. In the Closing event of many of the forms, I have code that asks the user whether he is sure he wants to close the form, because it...
14
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using VS2005 and .net 2.0. I'm creating an application that has 3 forms. I want allow users to move forward and backward with the forms and retain the data users have entered. I thought...
11
by: Simon van Beek | last post by:
Dear reader, By opening an application I get always the main Access window with the closing cross in the above right corner. Is there a possibility to make this closing cross invisible? ...
2
by: =?Utf-8?B?RXRoYW4gU3RyYXVzcw==?= | last post by:
I am (still) relatively new to Windows applications, most of my experience has been Web based, and I am confused about what exactly happens when the Main() method is called and how to manipulate...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.