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

order of event firing

Dan
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 Page_Load event immediately fires on
the codebehind page and then click event fires. When this happens, the
Page.IsPostBack property is true in the page_load event.

Why is the page_load event firing before the ImageButton_Click event?
Nov 19 '05 #1
2 1975
HI Dan:

The sequence of events was designed this way, you can get some more
information from the following doc:
http://msdn.microsoft.com/library/de...nlifecycle.asp

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Mon, 23 May 2005 10:17:26 -0700, Dan <sc*********@newsgroup.nospam>
wrote:
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 Page_Load event immediately fires on
the codebehind page and then click event fires. When this happens, the
Page.IsPostBack property is true in the page_load event.

Why is the page_load event firing before the ImageButton_Click event?


Nov 19 '05 #2
Thanks for Scott's informative info,

Hi Dan,

As for the events in ASP.NET , they're all serverside events which is part
of the ASP.NET serverside Page object Model. Generally when we hit a
control on the page at clientside, browser will first post back page , then
at serverside the request will go through a processing flow. So this is
very different from the concepts we got in winform application. Here are
some other tech articles which may help us get a clear view on these
concepts:

#The ASP.NET HTTP Runtime
http://msdn.microsoft.com/library/en...PNETHTTPRuntim
e.asp?frame=true

#The ASP.NET Page Object Model
http://msdn.microsoft.com/library/en...eobjectmodel.a
sp?frame=true

#Understanding ASP.NET View State
http://msdn.microsoft.com/library/de...us/dnaspp/html
/viewstate.asp

Hope also helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #3

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

Similar topics

13
by: Manuel Lopez | last post by:
I have a puzzling form timer problem that I didn't experience prior to Access 2003 (though I'm not sure access 2003 is to blame). Here's the situation: a computer has two access 2003 databases on...
7
by: Dan Nash | last post by:
Hi guys Ok, i have an aspx with a user control. In the user controls pageload i set a property (mystring = "test";). i then want to access that from the page_load of the aspx thats using the...
8
by: Frank van Vugt | last post by:
Hi, If during a transaction a number of deferred triggers are fired, what will be their execution order upon the commit? Will they be executed in order of firing or alfabetically or...
0
by: hazz | last post by:
I would like to have control over datagridview events so that when a user 'single clicks' anywhere on the grid, a method call is made to a service and if a user 'double clicks' a Customer detail...
1
by: cmay | last post by:
Can someone advise on this issue? We are seeing a page where, on the first load the base page (the class our page inherits from) fires it's PageLoad event first, followed by our Page's PageLoad....
4
by: TS | last post by:
I am creating a User control and i create some dynamic controls in the init handler. one of the controls is a custom validator which i assign a serverValidate event handler. I usally always do my...
1
by: Bill Cohagan | last post by:
While trying to debug some page logic I discovered that the ActiveStepChanged Event seems to fire out of order when a page is first loaded; i.e., a non postback page load. This is an event on a...
2
by: BK | last post by:
Can anyone point me to documentation on the firing order for events in a form? Years ago, I programmed in FoxPro and the order was Load, Init, Show, Activate, GotFocus (LISA G was the acronymn I...
1
by: =?Utf-8?B?TWlrZXkgQmFieQ==?= | last post by:
Greetings Hopefully, I can be clear and concise on this one, but I'm confused. I have a page with a ListBox <- ODS <- BusinessObject and a button. The Parameter Source is 'None'. The Default...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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.