order of event firing

G

Guest

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?
 
S

Steven Cheng[MSFT]

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-us/dnaspp/html/dngrfTheASPNETHTTPRuntim
e.asp?frame=true

#The ASP.NET Page Object Model
http://msdn.microsoft.com/library/en-us/dnaspp/html/aspnet-pageobjectmodel.a
sp?frame=true

#Understanding ASP.NET View State
http://msdn.microsoft.com/library/default.asp?url=/library/en-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.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,775
Messages
2,569,601
Members
45,182
Latest member
alexanderrm

Latest Threads

Top