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

Unload events

TR
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 application context. What
kinds of things are typically done in various unload eventhandlers (page
unload, form unload)?
Thanks
TR
Nov 19 '05 #1
2 1420
Every request into the webserver creates a new page object to handle that
one request. There are various events that fire on the page on each request
(Page_Init, Page_Load, etc). Page_Unload happens to be done of them. It's
meant to be a place to clean up any resources that you've not yet cleaned
up for the request. Typically, though, you probabaly should have already
cleaned up any resources by the time you get here (so in PageLoad, for example,
you typically open the DB connection, use it, then close it immediaetly).
So in the 4 years I've been doing ASP.NET development, I can't ever recall
using Page_Unload.

-Brock
DevelopMentor
http://staff.develop.com/ballen
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 application
context. What
kinds of things are typically done in various unload eventhandlers
(page
unload, form unload)?
Thanks
TR


Nov 19 '05 #2
TR
Thanks for the explanation.
TR

"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:48**********************@msnews.microsoft.com ...
Every request into the webserver creates a new page object to handle that
one request. There are various events that fire on the page on each request (Page_Init, Page_Load, etc). Page_Unload happens to be done of them. It's
meant to be a place to clean up any resources that you've not yet cleaned
up for the request. Typically, though, you probabaly should have already
cleaned up any resources by the time you get here (so in PageLoad, for example, you typically open the DB connection, use it, then close it immediaetly).
So in the 4 years I've been doing ASP.NET development, I can't ever recall
using Page_Unload.

-Brock
DevelopMentor
http://staff.develop.com/ballen

Nov 19 '05 #3

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

Similar topics

6
by: Marcia Gulesian | last post by:
What code can I put in the 'onbeforeunload' event to cancel the 'unload' action (when user closes browser) and then present the user with an alert saying that he/she must use the logout button.
35
by: Ross M. Greenberg | last post by:
I want to have an onUnload that runs only when the site is left, not when the current page is unloaded. Any ideas? Thanks! Ross
2
by: UJ | last post by:
When you are unloading a page, is there anyway to tell what the next page is going to be that you load? TIA.
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...
2
by: gesres | last post by:
I'm using an iframe to host an .aspx form. When I replace the source, via javascript, with a new .aspx page, the unload event doesn't fire, nor does the load even fire when I restore the original...
0
by: ABC | last post by:
How to I add some codes on Unload events on VSNET IDE? I cannot not found events in properties windows when Page object selected.
1
by: Mariella Bakker | last post by:
Hi All, In an ASP.NET project I am trying to improve performance. As it is now there seems to be a huge bottleneck between the end of the Page.PreRender event and the beginning of the...
11
by: Timofmars | last post by:
I'm try to Unload DB2 data from a table into a record sequential file on NT. I can an unload on Mainframe, but it doesn't seem to be an option in NT. In NT, all I can do is export/import. I can...
11
by: Joe | last post by:
why is that Public Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load works fine, but Public Sub Form1_Unload(ByVal sender As System.Object,...
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
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.