473,727 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Page_Unload Problem in ASP.Net 2.0

Hi,

After converting my projects to ASP.Net 2.0 I have seen a problem with
Page_unload. Ä°n framework 1.1 page_unload event fires when you are leaving
the page or has closed the browser window. Now in 2.0 when you initally load
the page Page_unload event fires after page_load event. In some of our aspx
pages we craete some versions of original records and if the user presses
cancel button or just leaves the page without cancelling we have to do some
cleaning and rollbacks in the database.

I have searched the net, but I couldn't have found a possible solution or a
workaround. Is there an event which just fires when the page is closing?

TIA

Cenk
Mar 10 '06 #1
7 2114
Cenk:
Page_Unload fires the same way. I'm 99.9999999% sure that in 1.1 it fired
the exact same way, after page_load. For it to work the way you say it did,
it would have to postback to the server. It is possible someone hooked a
postback into the unbeforeunload JAVASCRIPT method, which would then cause
your entire page to reprocess.

From:
http://www.sitepoint.com/article/asp...ver-controls/6
(which was done in 2001 -clearly not for 2.0)
"One thing to note is that the unloading of a page doesn't happen when you
close the browser or move to another page. The Page_Unload event happens
when the page has finished being processed by ASP.NET, and before it's sent
to the browser."

The only thing that's aware of a browser closing is javascript - which you
could use to cause a postback and have server-side clean up take place.

Karl

--
http://www.openmymind.net/

"Cenk" <Ce**@discussio ns.microsoft.co m> wrote in message
news:82******** *************** ***********@mic rosoft.com...
Hi,

After converting my projects to ASP.Net 2.0 I have seen a problem with
Page_unload. In framework 1.1 page_unload event fires when you are leaving
the page or has closed the browser window. Now in 2.0 when you initally
load
the page Page_unload event fires after page_load event. In some of our
aspx
pages we craete some versions of original records and if the user presses
cancel button or just leaves the page without cancelling we have to do
some
cleaning and rollbacks in the database.

I have searched the net, but I couldn't have found a possible solution or
a
workaround. Is there an event which just fires when the page is closing?

TIA

Cenk

Mar 10 '06 #2
Hi Karl,

Thanks for your reply. Maybe I was doing something wrong that worked in the
right way.

For the functionality I have mentioned I have two methods in my code which
is the following.

override protected void OnUnload(EventA rgs e)
{
base.OnUnload(e );
this.Unload += new EventHandler(Pa ge_Unload);
}

private void Page_Unload(obj ect sender, System.EventArg s e)
{
Some code for clean up
}

I traced the code in v1.1 and has seen that when the page is initially
loaded the OnUnload method is called but Page_Unload doesn't. When I am
leaving the page both methods are called and they do what I want.

In v2.0 initially both methods are called which is different in the old
version and when I am leaving the page none of them are called again.

I want to mention this difference. Is there a way to prevent this?

It is a good idea to write javascript code and do some cleaning.

Thanks

"Karl Seguin [MVP]" wrote:
Cenk:
Page_Unload fires the same way. I'm 99.9999999% sure that in 1.1 it fired
the exact same way, after page_load. For it to work the way you say it did,
it would have to postback to the server. It is possible someone hooked a
postback into the unbeforeunload JAVASCRIPT method, which would then cause
your entire page to reprocess.

From:
http://www.sitepoint.com/article/asp...ver-controls/6
(which was done in 2001 -clearly not for 2.0)
"One thing to note is that the unloading of a page doesn't happen when you
close the browser or move to another page. The Page_Unload event happens
when the page has finished being processed by ASP.NET, and before it's sent
to the browser."

The only thing that's aware of a browser closing is javascript - which you
could use to cause a postback and have server-side clean up take place.

Karl

--
http://www.openmymind.net/

"Cenk" <Ce**@discussio ns.microsoft.co m> wrote in message
news:82******** *************** ***********@mic rosoft.com...
Hi,

After converting my projects to ASP.Net 2.0 I have seen a problem with
Page_unload. In framework 1.1 page_unload event fires when you are leaving
the page or has closed the browser window. Now in 2.0 when you initally
load
the page Page_unload event fires after page_load event. In some of our
aspx
pages we craete some versions of original records and if the user presses
cancel button or just leaves the page without cancelling we have to do
some
cleaning and rollbacks in the database.

I have searched the net, but I couldn't have found a possible solution or
a
workaround. Is there an event which just fires when the page is closing?

TIA

Cenk


Mar 10 '06 #3
That is wrong ;)

There's no need to override the event and then hook into it again - just
extra work for nothing. Even so, the only way it would work is if you are
posting back when they leave. Like there's a linkbutton or a button that
says "Cancel" or "home" that actually does a postback and
Response.Redire cts()..

if they simply close their browser, use their back button or following a
plain link, I still refuse to believe this worked without having additional
javascript in there :)

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Cenk" <Ce**@discussio ns.microsoft.co m> wrote in message
news:CB******** *************** ***********@mic rosoft.com...
Hi Karl,

Thanks for your reply. Maybe I was doing something wrong that worked in
the
right way.

For the functionality I have mentioned I have two methods in my code which
is the following.

override protected void OnUnload(EventA rgs e)
{
base.OnUnload(e );
this.Unload += new EventHandler(Pa ge_Unload);
}

private void Page_Unload(obj ect sender, System.EventArg s e)
{
Some code for clean up
}

I traced the code in v1.1 and has seen that when the page is initially
loaded the OnUnload method is called but Page_Unload doesn't. When I am
leaving the page both methods are called and they do what I want.

In v2.0 initially both methods are called which is different in the old
version and when I am leaving the page none of them are called again.

I want to mention this difference. Is there a way to prevent this?

It is a good idea to write javascript code and do some cleaning.

Thanks

"Karl Seguin [MVP]" wrote:
Cenk:
Page_Unload fires the same way. I'm 99.9999999% sure that in 1.1 it
fired
the exact same way, after page_load. For it to work the way you say it
did,
it would have to postback to the server. It is possible someone hooked a
postback into the unbeforeunload JAVASCRIPT method, which would then
cause
your entire page to reprocess.

From:
http://www.sitepoint.com/article/asp...ver-controls/6
(which was done in 2001 -clearly not for 2.0)
"One thing to note is that the unloading of a page doesn't happen when
you
close the browser or move to another page. The Page_Unload event happens
when the page has finished being processed by ASP.NET, and before it's
sent
to the browser."

The only thing that's aware of a browser closing is javascript - which
you
could use to cause a postback and have server-side clean up take place.

Karl

--
http://www.openmymind.net/

"Cenk" <Ce**@discussio ns.microsoft.co m> wrote in message
news:82******** *************** ***********@mic rosoft.com...
> Hi,
>
> After converting my projects to ASP.Net 2.0 I have seen a problem with
> Page_unload. In framework 1.1 page_unload event fires when you are
> leaving
> the page or has closed the browser window. Now in 2.0 when you initally
> load
> the page Page_unload event fires after page_load event. In some of our
> aspx
> pages we craete some versions of original records and if the user
> presses
> cancel button or just leaves the page without cancelling we have to do
> some
> cleaning and rollbacks in the database.
>
> I have searched the net, but I couldn't have found a possible solution
> or
> a
> workaround. Is there an event which just fires when the page is
> closing?
>
> TIA
>
> Cenk


Mar 10 '06 #4
Well, it works in some way, I can send you an example project if you want.

In 2.0 it doesn't, I have to search for another way.

"Karl Seguin [MVP]" wrote:
That is wrong ;)

There's no need to override the event and then hook into it again - just
extra work for nothing. Even so, the only way it would work is if you are
posting back when they leave. Like there's a linkbutton or a button that
says "Cancel" or "home" that actually does a postback and
Response.Redire cts()..

if they simply close their browser, use their back button or following a
plain link, I still refuse to believe this worked without having additional
javascript in there :)

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Cenk" <Ce**@discussio ns.microsoft.co m> wrote in message
news:CB******** *************** ***********@mic rosoft.com...
Hi Karl,

Thanks for your reply. Maybe I was doing something wrong that worked in
the
right way.

For the functionality I have mentioned I have two methods in my code which
is the following.

override protected void OnUnload(EventA rgs e)
{
base.OnUnload(e );
this.Unload += new EventHandler(Pa ge_Unload);
}

private void Page_Unload(obj ect sender, System.EventArg s e)
{
Some code for clean up
}

I traced the code in v1.1 and has seen that when the page is initially
loaded the OnUnload method is called but Page_Unload doesn't. When I am
leaving the page both methods are called and they do what I want.

In v2.0 initially both methods are called which is different in the old
version and when I am leaving the page none of them are called again.

I want to mention this difference. Is there a way to prevent this?

It is a good idea to write javascript code and do some cleaning.

Thanks

"Karl Seguin [MVP]" wrote:
Cenk:
Page_Unload fires the same way. I'm 99.9999999% sure that in 1.1 it
fired
the exact same way, after page_load. For it to work the way you say it
did,
it would have to postback to the server. It is possible someone hooked a
postback into the unbeforeunload JAVASCRIPT method, which would then
cause
your entire page to reprocess.

From:
http://www.sitepoint.com/article/asp...ver-controls/6
(which was done in 2001 -clearly not for 2.0)
"One thing to note is that the unloading of a page doesn't happen when
you
close the browser or move to another page. The Page_Unload event happens
when the page has finished being processed by ASP.NET, and before it's
sent
to the browser."

The only thing that's aware of a browser closing is javascript - which
you
could use to cause a postback and have server-side clean up take place.

Karl

--
http://www.openmymind.net/

"Cenk" <Ce**@discussio ns.microsoft.co m> wrote in message
news:82******** *************** ***********@mic rosoft.com...
> Hi,
>
> After converting my projects to ASP.Net 2.0 I have seen a problem with
> Page_unload. In framework 1.1 page_unload event fires when you are
> leaving
> the page or has closed the browser window. Now in 2.0 when you initally
> load
> the page Page_unload event fires after page_load event. In some of our
> aspx
> pages we craete some versions of original records and if the user
> presses
> cancel button or just leaves the page without cancelling we have to do
> some
> cleaning and rollbacks in the database.
>
> I have searched the net, but I couldn't have found a possible solution
> or
> a
> workaround. Is there an event which just fires when the page is
> closing?
>
> TIA
>
> Cenk


Mar 10 '06 #5
I've taken a look at ur sample application. I can't tell you why it doesn't
work in 2.0 (i opened that project in 2.0 and the session was removed when
going back to webform1.aspx).

I'm still not sure you understand what's going on in either 1.1 or 2.0 with
respect to this.

Page_Unload fires after Render, but before the page is actually on the
browser

It goes
init
load
render
unload
--> send to browser.

Unload doesn't fire when the user hits "x" on their browser or anything like
that.

Look at ur example, you set a session in webform1, then go to webform2. When
webform2 first loads, the session will be stripped 'cuz unload will fire and
remove it - before the page is even loaded on the client, let alone when
they close their browser. So of course it's working, but I don't think it's
working how you think it is. The "cleanup" is happening much sooner than
you are thinking. It's very possible this is what you want...and again, I'd
exect it to work as-is in 2.0. In your example, unload actually fires
twice...once when the page is first loaded and again when the button is
clicked which causes a postback and the button event is fired.

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Cenk" <cenkoz2000@nsp m_yahoo.com> wrote in message
news:1D******** *************** ***********@mic rosoft.com...
Well, it works in some way, I can send you an example project if you want.

In 2.0 it doesn't, I have to search for another way.

"Karl Seguin [MVP]" wrote:
That is wrong ;)

There's no need to override the event and then hook into it again - just
extra work for nothing. Even so, the only way it would work is if you
are
posting back when they leave. Like there's a linkbutton or a button that
says "Cancel" or "home" that actually does a postback and
Response.Redire cts()..

if they simply close their browser, use their back button or following a
plain link, I still refuse to believe this worked without having
additional
javascript in there :)

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Cenk" <Ce**@discussio ns.microsoft.co m> wrote in message
news:CB******** *************** ***********@mic rosoft.com...
> Hi Karl,
>
> Thanks for your reply. Maybe I was doing something wrong that worked in
> the
> right way.
>
> For the functionality I have mentioned I have two methods in my code
> which
> is the following.
>
> override protected void OnUnload(EventA rgs e)
> {
> base.OnUnload(e );
> this.Unload += new EventHandler(Pa ge_Unload);
> }
>
> private void Page_Unload(obj ect sender, System.EventArg s e)
> {
> Some code for clean up
> }
>
> I traced the code in v1.1 and has seen that when the page is initially
> loaded the OnUnload method is called but Page_Unload doesn't. When I am
> leaving the page both methods are called and they do what I want.
>
> In v2.0 initially both methods are called which is different in the old
> version and when I am leaving the page none of them are called again.
>
> I want to mention this difference. Is there a way to prevent this?
>
> It is a good idea to write javascript code and do some cleaning.
>
> Thanks
>
> "Karl Seguin [MVP]" wrote:
>
>> Cenk:
>> Page_Unload fires the same way. I'm 99.9999999% sure that in 1.1 it
>> fired
>> the exact same way, after page_load. For it to work the way you say
>> it
>> did,
>> it would have to postback to the server. It is possible someone hooked
>> a
>> postback into the unbeforeunload JAVASCRIPT method, which would then
>> cause
>> your entire page to reprocess.
>>
>> From:
>> http://www.sitepoint.com/article/asp...ver-controls/6
>> (which was done in 2001 -clearly not for 2.0)
>> "One thing to note is that the unloading of a page doesn't happen when
>> you
>> close the browser or move to another page. The Page_Unload event
>> happens
>> when the page has finished being processed by ASP.NET, and before it's
>> sent
>> to the browser."
>>
>> The only thing that's aware of a browser closing is javascript - which
>> you
>> could use to cause a postback and have server-side clean up take
>> place.
>>
>> Karl
>>
>> --
>> http://www.openmymind.net/
>>
>>
>>
>> "Cenk" <Ce**@discussio ns.microsoft.co m> wrote in message
>> news:82******** *************** ***********@mic rosoft.com...
>> > Hi,
>> >
>> > After converting my projects to ASP.Net 2.0 I have seen a problem
>> > with
>> > Page_unload. In framework 1.1 page_unload event fires when you are
>> > leaving
>> > the page or has closed the browser window. Now in 2.0 when you
>> > initally
>> > load
>> > the page Page_unload event fires after page_load event. In some of
>> > our
>> > aspx
>> > pages we craete some versions of original records and if the user
>> > presses
>> > cancel button or just leaves the page without cancelling we have to
>> > do
>> > some
>> > cleaning and rollbacks in the database.
>> >
>> > I have searched the net, but I couldn't have found a possible
>> > solution
>> > or
>> > a
>> > workaround. Is there an event which just fires when the page is
>> > closing?
>> >
>> > TIA
>> >
>> > Cenk
>>
>>
>>


Mar 10 '06 #6
Hi Cenk!

Did you find any way to do the Page_Unload equal in the 1.1 version ?
I had the same problem!

Thks
Riccardo

"Cenk" wrote:
Well, it works in some way, I can send you an example project if you want.

In 2.0 it doesn't, I have to search for another way.

"Karl Seguin [MVP]" wrote:
That is wrong ;)

There's no need to override the event and then hook into it again - just
extra work for nothing. Even so, the only way it would work is if you are
posting back when they leave. Like there's a linkbutton or a button that
says "Cancel" or "home" that actually does a postback and
Response.Redire cts()..

if they simply close their browser, use their back button or following a
plain link, I still refuse to believe this worked without having additional
javascript in there :)

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Cenk" <Ce**@discussio ns.microsoft.co m> wrote in message
news:CB******** *************** ***********@mic rosoft.com...
Hi Karl,

Thanks for your reply. Maybe I was doing something wrong that worked in
the
right way.

For the functionality I have mentioned I have two methods in my code which
is the following.

override protected void OnUnload(EventA rgs e)
{
base.OnUnload(e );
this.Unload += new EventHandler(Pa ge_Unload);
}

private void Page_Unload(obj ect sender, System.EventArg s e)
{
Some code for clean up
}

I traced the code in v1.1 and has seen that when the page is initially
loaded the OnUnload method is called but Page_Unload doesn't. When I am
leaving the page both methods are called and they do what I want.

In v2.0 initially both methods are called which is different in the old
version and when I am leaving the page none of them are called again.

I want to mention this difference. Is there a way to prevent this?

It is a good idea to write javascript code and do some cleaning.

Thanks

"Karl Seguin [MVP]" wrote:

> Cenk:
> Page_Unload fires the same way. I'm 99.9999999% sure that in 1.1 it
> fired
> the exact same way, after page_load. For it to work the way you say it
> did,
> it would have to postback to the server. It is possible someone hooked a
> postback into the unbeforeunload JAVASCRIPT method, which would then
> cause
> your entire page to reprocess.
>
> From:
> http://www.sitepoint.com/article/asp...ver-controls/6
> (which was done in 2001 -clearly not for 2.0)
> "One thing to note is that the unloading of a page doesn't happen when
> you
> close the browser or move to another page. The Page_Unload event happens
> when the page has finished being processed by ASP.NET, and before it's
> sent
> to the browser."
>
> The only thing that's aware of a browser closing is javascript - which
> you
> could use to cause a postback and have server-side clean up take place.
>
> Karl
>
> --
> http://www.openmymind.net/
>
>
>
> "Cenk" <Ce**@discussio ns.microsoft.co m> wrote in message
> news:82******** *************** ***********@mic rosoft.com...
> > Hi,
> >
> > After converting my projects to ASP.Net 2.0 I have seen a problem with
> > Page_unload. In framework 1.1 page_unload event fires when you are
> > leaving
> > the page or has closed the browser window. Now in 2.0 when you initally
> > load
> > the page Page_unload event fires after page_load event. In some of our
> > aspx
> > pages we craete some versions of original records and if the user
> > presses
> > cancel button or just leaves the page without cancelling we have to do
> > some
> > cleaning and rollbacks in the database.
> >
> > I have searched the net, but I couldn't have found a possible solution
> > or
> > a
> > workaround. Is there an event which just fires when the page is
> > closing?
> >
> > TIA
> >
> > Cenk
>
>
>


Apr 26 '06 #7
Hi,

There is no solution to this problem in 2.0. You need to change your pages
in a way that original record is not affected until the user hits the save
button. But if the users have a bad habit of leaving the page by selecting
another menu item or just by pressing the cross of the IE window there will
be lots of dummy records. There must be some process which deletes these
records

A lot of people responded to me that they are using page_unload for cleaning
up in 1.1 even though MS did not designed it for this purpose.

"Riccardo" wrote:
Hi Cenk!

Did you find any way to do the Page_Unload equal in the 1.1 version ?
I had the same problem!

Thks
Riccardo

"Cenk" wrote:
Well, it works in some way, I can send you an example project if you want.

In 2.0 it doesn't, I have to search for another way.

"Karl Seguin [MVP]" wrote:
That is wrong ;)

There's no need to override the event and then hook into it again - just
extra work for nothing. Even so, the only way it would work is if you are
posting back when they leave. Like there's a linkbutton or a button that
says "Cancel" or "home" that actually does a postback and
Response.Redire cts()..

if they simply close their browser, use their back button or following a
plain link, I still refuse to believe this worked without having additional
javascript in there :)

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Cenk" <Ce**@discussio ns.microsoft.co m> wrote in message
news:CB******** *************** ***********@mic rosoft.com...
> Hi Karl,
>
> Thanks for your reply. Maybe I was doing something wrong that worked in
> the
> right way.
>
> For the functionality I have mentioned I have two methods in my code which
> is the following.
>
> override protected void OnUnload(EventA rgs e)
> {
> base.OnUnload(e );
> this.Unload += new EventHandler(Pa ge_Unload);
> }
>
> private void Page_Unload(obj ect sender, System.EventArg s e)
> {
> Some code for clean up
> }
>
> I traced the code in v1.1 and has seen that when the page is initially
> loaded the OnUnload method is called but Page_Unload doesn't. When I am
> leaving the page both methods are called and they do what I want.
>
> In v2.0 initially both methods are called which is different in the old
> version and when I am leaving the page none of them are called again.
>
> I want to mention this difference. Is there a way to prevent this?
>
> It is a good idea to write javascript code and do some cleaning.
>
> Thanks
>
> "Karl Seguin [MVP]" wrote:
>
>> Cenk:
>> Page_Unload fires the same way. I'm 99.9999999% sure that in 1.1 it
>> fired
>> the exact same way, after page_load. For it to work the way you say it
>> did,
>> it would have to postback to the server. It is possible someone hooked a
>> postback into the unbeforeunload JAVASCRIPT method, which would then
>> cause
>> your entire page to reprocess.
>>
>> From:
>> http://www.sitepoint.com/article/asp...ver-controls/6
>> (which was done in 2001 -clearly not for 2.0)
>> "One thing to note is that the unloading of a page doesn't happen when
>> you
>> close the browser or move to another page. The Page_Unload event happens
>> when the page has finished being processed by ASP.NET, and before it's
>> sent
>> to the browser."
>>
>> The only thing that's aware of a browser closing is javascript - which
>> you
>> could use to cause a postback and have server-side clean up take place.
>>
>> Karl
>>
>> --
>> http://www.openmymind.net/
>>
>>
>>
>> "Cenk" <Ce**@discussio ns.microsoft.co m> wrote in message
>> news:82******** *************** ***********@mic rosoft.com...
>> > Hi,
>> >
>> > After converting my projects to ASP.Net 2.0 I have seen a problem with
>> > Page_unload. In framework 1.1 page_unload event fires when you are
>> > leaving
>> > the page or has closed the browser window. Now in 2.0 when you initally
>> > load
>> > the page Page_unload event fires after page_load event. In some of our
>> > aspx
>> > pages we craete some versions of original records and if the user
>> > presses
>> > cancel button or just leaves the page without cancelling we have to do
>> > some
>> > cleaning and rollbacks in the database.
>> >
>> > I have searched the net, but I couldn't have found a possible solution
>> > or
>> > a
>> > workaround. Is there an event which just fires when the page is
>> > closing?
>> >
>> > TIA
>> >
>> > Cenk
>>
>>
>>

Apr 26 '06 #8

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

Similar topics

0
1444
by: tascien | last post by:
I found a use for Page_Unload event method... here is the scenario: 1. Page.aspx has DoStuff.ascx in it. 2. DoStuff.ascx has a button that updates child control label lbXml depending on user choices on input controls inside DoStuff.ascx. 3. But page.aspx, whats to know what is stored in lbXml so it can process its own logic. problem:
1
15697
by: Robert Scheer | last post by:
Hi. Debugging one of my pages I noticed that everytime I call the page, the first event to run is Page_Load and after it the Page_Unload. If I postback to the page the Page_Unload runs again. Shouldn't the Page_Unload event runs only when I close the page or submit the page? I can't understand why the Unload event runs when I load the page !! Thanks,
19
3492
by: Heidi Hundåla | last post by:
Hi ! I have a Wep App in C#. Page_Unload fires after Page_Load, and it seems totally unreasonable when you want to use this event when you _leave_ the page. In my project we wanted to use the Page_Unload - event to clean up the Session variables, but when it turns out that it fires before the end, it screws up the code, and
4
6094
by: Larry Morris | last post by:
The following code, pasted into a web form with a link button on it, will cause the page_unload event to fire twice. If I remove the response.redirect, the problem goes away :). I've got a work around, but I'm curious how one is supposed to programmatically navigate between web pages without the page_unload event firing twice. Thanks, Larry
3
9586
by: Andrew Vickers | last post by:
Hi, I'm just trying to manually add a page_unload function in my code-behind module, but with no success. Can anyone help me with the correct syntax to add the function to my code? I've tried the following already with no joy: protected void Page_Unload(object sender, System.EventArgs e) { Session.Add("SES_CURRENT_SRQ", 34);
0
1413
by: chefo | last post by:
Well, the subject describes my problem quite well :-) Here is some additional information. I use a common base class for all the pages in my project. It is derived from Page and it is not abstract, because there was some problem with the compilation. I define a common Page_Unload handler in the base class and subscribe for the event like this: public class IPage : System.Web.UI.Page {
0
1708
by: JeffM | last post by:
This seems odd, but it appears that the Page_Unload event is fired twice on a Response.Redirect or a Server.Transfer. The output below demonstrates that during the move from the first to the 2nd page, the event fires twice on the 1st page during Postback. The "var" set the first time is visible the 2nd time it fires. Anyone else notice this? Thanks, Jeff
2
2134
by: RAM | last post by:
Hello, I am learning .NET 2.0 and I have written simple application with Default.aspx page and logging in Logon.aspx/Logon.aspx.cs. After Page_Unload of Logon.aspx.cs (I have checked by debugging) I receive error that I don't understand: Message: Exception of type 'System.Web.HttpUnhandledException' was thrown. Stack: at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean
5
15280
by: =?Utf-8?B?Um9sYW5kcGlzaA==?= | last post by:
Hi there, I'm using Web Developer Express 2005 in my ASP.NET learning. I tried creating a simple aspx page using "code-behind" approach. I noticed that protected void Page_Load event method appears automatically in mypage.aspx.cs Ok, so far so good, but now I need to code something when Page_Unload occurs but I can't find a place to choose or select Page_Unload event. I'm asking this because I created a mypage2.aspx using "single-file"...
0
8752
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,...
0
9402
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, 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...
0
9259
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 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...
1
9182
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,...
1
6702
isladogs
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...
0
6011
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();...
0
4521
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2639
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2157
bsmnconsultancy
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...

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.