mRf
mRf

Reputation: 57

Event/postback cycle in dropdown

I know this might be an easy question but still:

I got a dropdown and a button on my website, autopostback is false on the dropdown and I use the "SelectedIndexChanged" event. When I pick an item from the dropdown nothing happens ofcoure, but when I click the button, the system somehow knows that the index has changed in the dropdown and it calls the SelectedIndexChanged event, where does it store this information?

Im guessing the events are being added to a list and then fired upon postback

Upvotes: 1

Views: 149

Answers (1)

Steve Martin
Steve Martin

Reputation: 1642

The original state of the DDL is stored in viewstate. Upon postback, the new state and old state are compared and the event fired (or not) accordingly

Upvotes: 2

Related Questions