Page_Load - When does it exactly fires?

M

M. Ali Qureshi

Hi,

My page has following structure:
- Page
....|-MultiView
.......|--View1 (Contains a wizard)
.......|--View2 (Contains another wizard)

I have following event handlers in my code file

Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load '(This handles ofcourse page load)
Protected Sub HitRaterWiz_Init(ByVal sender As Object, ByVal e As
System.EventArgs) Handles HitRaterWiz.Init '(This handles init of one wizard
and adds steps dynamically)
Protected Sub WeightWiz_Init(ByVal sender As Object, ByVal e As
System.EventArgs) Handles WeightWiz.Init '(This handles init of sencong
wizard and adds steps dynamically)

Could someone tell me in which orders the above 3 events will be fired? I
assumed that page_load will be fired fist, but apparently its not the case.
Is it correct? or what i'm doing wrong? How can i get page_load to fire
first of all?

Any help will be appreciated.

Regards
 
M

Michael Nemtsev [MVP]

Hello M. Ali Qureshi,

what is the HitRaterWiz ?

Just read the following article about page life cycle
http://msdn2.microsoft.com/en-us/library/ms178472.aspx
and see this picture http://blogs.clearscreen.com/dtax/files/aspNET_Page_LifeCycle.jpg

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


M> Hi,
M>
M> My page has following structure:
M> - Page
M> ...|-MultiView
M> ......|--View1 (Contains a wizard)
M> ......|--View2 (Contains another wizard)
M> I have following event handlers in my code file
M>
M> Protected Sub Page_Load(ByVal sender As Object, ByVal e As
M> System.EventArgs) Handles Me.Load '(This handles ofcourse page load)
M> Protected Sub HitRaterWiz_Init(ByVal sender As Object, ByVal e As
M> System.EventArgs) Handles HitRaterWiz.Init '(This handles init of one
M> wizard
M> and adds steps dynamically)
M> Protected Sub WeightWiz_Init(ByVal sender As Object, ByVal e As
M> System.EventArgs) Handles WeightWiz.Init '(This handles init of
M> sencong
M> wizard and adds steps dynamically)
M>
M> Could someone tell me in which orders the above 3 events will be
M> fired? I assumed that page_load will be fired fist, but apparently
M> its not the case. Is it correct? or what i'm doing wrong? How can i
M> get page_load to fire first of all?
M>
M> Any help will be appreciated.
M>
M> Regards
M>
 

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,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top