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 2 1440
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
Thanks for the explanation.
TR
"Brock Allen" <ba****@NOSPAMd evelop.com> wrote in message
news:48******** **************@ msnews.microsof t.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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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.
|
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
|
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.
|
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 the user perform
operation on this page (postback navigation based). I also need to
clean up the session data when the user leave the page (by a anyway).
My question is about the Unload event, is it safe to use the unload
|
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 page. I want
them to. Thanks for any suggestions.
| |
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.
|
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 Page.Unload event. Using a performance analyzing
tool (AqTime 4.9) I am not able to find out what is happening between these
2 events. Can anyone shine some light on what is normally going on between
these 2 events?
Thanks in advance.
|
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 do a Load too, but not an
Unload. I just want the only the data from the table in a record
sequential file. Export seems only to give options to have a delimited
line sequential file or a record sequential file where the data is
preceeded by...
|
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, ByVal e As
System.EventArgs) Handles MyBase.Load
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |