473,493 Members | 4,147 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

PostBack Event Firing Sequence

Just wondering if I can count on Page_Load *always* firing before event
procedures of other controls on the form.

E.G., suppose I have a DropDownList server control and it is
"autopostbacking". Will Page_Load always fire before the
SelectedIndexChanged event of the DDL?

Thanks.
Nov 18 '05 #1
3 1937
Hi Guadala,

The Load event will *always* fire *before* the change events, I promess :-)

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx
My profile: http://aspnet2.com/mvp.ashx?vga
"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:OC**************@TK2MSFTNGP12.phx.gbl...
Just wondering if I can count on Page_Load *always* firing before event
procedures of other controls on the form.

E.G., suppose I have a DropDownList server control and it is
"autopostbacking". Will Page_Load always fire before the
SelectedIndexChanged event of the DDL?

Thanks.

Nov 18 '05 #2

Yes they will always be called after page_load, the order goes like this

Page_Init
Page_Load
Validation
Event Handling (your control events get fired here)
Page_Unload

A good read is
http://msdn.microsoft.com/library/de...singStages.asp

Stephen.

"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:OC**************@TK2MSFTNGP12.phx.gbl...
Just wondering if I can count on Page_Load *always* firing before event
procedures of other controls on the form.

E.G., suppose I have a DropDownList server control and it is
"autopostbacking". Will Page_Load always fire before the
SelectedIndexChanged event of the DDL?

Thanks.

Nov 18 '05 #3
You can place a breakpoint in your "page_load" and see what happens.
Remember to
configure your project to use "debug".

Alternatively, you can "cause" an exception in you code and observe the
order on the call stack.

"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:OC**************@TK2MSFTNGP12.phx.gbl...
Just wondering if I can count on Page_Load *always* firing before event
procedures of other controls on the form.

E.G., suppose I have a DropDownList server control and it is
"autopostbacking". Will Page_Load always fire before the
SelectedIndexChanged event of the DDL?

Thanks.

Nov 18 '05 #4

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

Similar topics

1
1257
by: Robert W. | last post by:
I have a 'Controller' object that manages the interaction between its two children: a Form and a DataObject. I've written specialized code in the Controller to control how the Form updates the...
5
2786
by: Steve M | last post by:
Why are my sessions lasting so long? I have them set to 20 minute timeout in config file? The Session_End event is getting called an hour or more sometimes--well after the user has stopped...
7
2332
by: Shane Bishop | last post by:
I've been fighting with the Page_Load event firing twice. I looked through this user group and saw several other people having similar problems. There were various reasons for it:...
4
6065
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...
2
1983
by: Dan | last post by:
I have an aspx page with a form on it. There are a couple of textboxes and an ImageButton. The page is loaded from another page using Server.Transfer. When I click on the ImageButton, the...
4
10987
by: Arvind P Rangan | last post by:
Hi, Has anybody worked on disabling postback event of button event in webforms. As it does not have a property of autopostback how do we make it disable. I tried few article but they have...
3
1299
by: Phillip N Rounds | last post by:
In diagnosing a problem, I noted that a button_click event gets run only after the page Page_Load event of the post back. (VS 2003, ASPNET 1.1, C#) Can this be correct? I'm trying to set...
16
9148
by: tommaso.gastaldi | last post by:
Hello, A probably dumb question... does anyone know hot to avoid that if one keep the mouse pressed on an arrow of the numericUpDown it continues to fire events (it uses evidently a timer) ?...
0
1371
by: =?Utf-8?B?bGl1eGluZmVpaHU=?= | last post by:
Hi, I use post way realization page postback this am must,How realizesunder the post way controls postback continuously to be unable to findthe solution the method to hope can obtain master's help...
0
6989
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
7195
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...
1
6873
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...
1
4889
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...
0
4579
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...
0
3088
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...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1400
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 ...
0
285
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...

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.