M
Matthew Louden
I created simple ASP.NET web application to test how AutoPostBack property
in a web control works.
I set AutoPostBack property to be true of a web control. When I run the
application, here's the sequences when I step through the program:
1. Page loaded to the browser
2. Page_Load method is called with non-postback event
3. The user has certain actions on a control
4. Page_Load method is called with postback event
5. A control's event handler is called.
My question is why Page_Load method is called before a control's event
handler? i.e. Should step 4 and step 5 be reversed in order?
My understanding is ONE CONTROL EVENT causes ONE POSTBACK. Event is the
cause, and PostBack is the result. Am I wrong?? Thats why I think a
control's event handler should call first before Page_Load method.
Please advise. Thanks!
`
in a web control works.
I set AutoPostBack property to be true of a web control. When I run the
application, here's the sequences when I step through the program:
1. Page loaded to the browser
2. Page_Load method is called with non-postback event
3. The user has certain actions on a control
4. Page_Load method is called with postback event
5. A control's event handler is called.
My question is why Page_Load method is called before a control's event
handler? i.e. Should step 4 and step 5 be reversed in order?
My understanding is ONE CONTROL EVENT causes ONE POSTBACK. Event is the
cause, and PostBack is the result. Am I wrong?? Thats why I think a
control's event handler should call first before Page_Load method.
Please advise. Thanks!
`