views:

170

answers:

1

Let's assume I have a very simple form, with a submit button and a dropdown list. When I change the list entry and hit submit, at what stage in the postback processing does the viewstate reflect my changed list entry?

According to O'Reilly's Learning ASP.Net 3.5, there are two loads taking place-- one before form validation and another after (diagram on page 266 for those with a copy).

According to the diagram the viewstate is loaded during the first load stage, before the validation. I assume my changed dropdown is reflected at this point?

Also, according to the diagram, posted data is processed twice, both before and after validation. Could anyone elaborate a little more on this, and what form processing takes place at each point?

Thanks for the help. It's a little misty, what takes place when and I'm trying to clear it up a bit.

+2  A: 

The viewstate is loaded after page initialization but before page load. Validation takes place just before the event triggers for the button that caused the validation.

Phaedrus