Understanding event order ???

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear all,

I am trying to understand postack event ordering. for that I have a web form
with a text box, listbox and button server controls.

Then I add a response.write in eaxh control event changed.
When I run my application I proceed in following order :

First I change a text in the text box
Then I select an item in the list box
And I press a Ok button

-> event order I gets are :
Page load
text changed
Item Selected
Button Clicked
Page render

thats fine, then next I change the way I use my interface by selecting first
an item in the list and then chage a text in the text box. As far as I
undrstand, events are cached so I was expecting to gets at that time the List
item selected events coming before the text change event, but I get same
order of event as before

Could any one explain ?

thnaks for your help
regards
serge
 
Serge:
Events won't fire in the order that they occurred on the client. Not enough
information is passed back to asp.net to determine the actual event of
orders. If you need to know the specific order, you either have to track
that yourself on the cilentside (using javascript and hidden field) or set
the autopostback=true for those controls and handle each event one at a
time.

karl
 
Thanks for your information, I was just curious

In general, how people handle evenst in there web application? did they
always set the Autopostback to its defualt value of false and treat them in
one shot or is there some cases where it absolutely require Autopostback to
true
 
Back
Top