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

unload asp page

ae
Provided is some basic code VB.Net for applications, but I am trying to find
the best method to destroy an asp page, similar to EXIT if i were to go to IE
press File and EXIT. Does anyone know how to do that in ASP.NET with VB
code?

Unload Me 'does not work either
WebForm1.Exit() 'also does not do the trick either
Nov 18 '05 #1
1 4592
Thank God you asked your question when you did. Do you realize all of the
possible combinations of imagined syntax that you could have tried? ;-)

There are 2 components to an ASP.Net application: Server-side classes and
code, and client-side HTML. When a Request is received by the web server,
the HTML doesn't exist. ASP.Net has to build it. Therefore, there is simply
no way on the server to close the browser window. It has to be done using
JavaScript on the client, which you can certainly add to the Page while it
is processing on the server. The following client-side JavaScript will work:

<script type="text/javascript"><!--
window.opener = self; window.close();
// --></script>

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"ae" <ae@discussions.microsoft.com> wrote in message
news:DD**********************************@microsof t.com...
Provided is some basic code VB.Net for applications, but I am trying to find the best method to destroy an asp page, similar to EXIT if i were to go to IE press File and EXIT. Does anyone know how to do that in ASP.NET with VB
code?

Unload Me 'does not work either
WebForm1.Exit() 'also does not do the trick either

Nov 18 '05 #2

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

Similar topics

1
by: David A. Beck | last post by:
I have a frameset with an index frame and a main frame. The aspx pages in the main frame are loaded based on the hyperlinks clicked in the index frame. In any aspx page in the main frame I want to...
1
by: hal | last post by:
I have an application that includes an activex component that consumes resources that must be released when the a page is unloaded. Toward this end I subscribe to the unload event of the body...
1
by: Hal | last post by:
My most sincere gratitude to anyone who can help me work around this! I have work that needs to be done in javascript on the client whenever a page is unloaded. To this end, I subscribe to...
6
by: Mike | last post by:
I have a web form in my application that will be used for both viewing and updating information. I have a requirement that if any data has been changed on the page and the user attempts to leave...
2
by: TR | last post by:
I'm coming to asp.net with mainly a desktop application background, and would be grateful if someone could explain what is meant by "unload" in asp.net . It's not the same as unload in a desktop...
1
by: Mike Labosh | last post by:
I have a webform with this event procedure: Private Sub Page_Unload( _ ByVal sender As Object, _ ByVal e As System.EventArgs _ ) Handles MyBase.Unload Logger.Logout(User.Identity.Name) ...
3
by: Gauthier Segay | last post by:
Hello, I've an application where all my pages implement a PAGE_CODE string property, this property is stored in HttpContext.Current.Items. In some page, I must persist data in session while...
1
by: Donkey Cart Racer | last post by:
Hi, I have a page - page1 which opens a window1 where users can look at tasks, in window1 users can click and open window2 where they can create new tasks I want to refresh window1 when...
2
gregerly
by: gregerly | last post by:
I'm working on a corporate intranet site and am trying to create a page that will warn a user on window unload if they have not saved thier work. Basically I just select all inputs, and on change,...
5
by: =?Utf-8?B?U3RldmVuIFRhbmc=?= | last post by:
It seems that one page XBAP whose Unloaded event never get called, I need put some clearing stuff (I.G stop dispatcher time) when user close browser, it unload event doesn't work, where shall I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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?
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.