M
Mark Rae
This behaviour has existed since v1.x, and it's still there in v2, so I
wonder if it is actually a bug or a "feature"
If the latter, I can't see
the rationale behind it...
Here's how to reproduce it.
1) Create a simple web page with an <asp
ropDownList> and an <asp:Button>
2) Create a SelectedIndexChanged method for the DropDownList and a Command
event for the Button
3) Add any single line of code to each event - just enough so you can set a
breakpoint
4) Populate the DropDownList in the Page_Init method - only a couple of
items will do, just enough to cause the event to fire.
5) Set a breakpoint in the SelectedIndexChanged method and the Command
method
6) Run the page in Debug mode
7) Select a different item in the DropDownList - you jump into its
SelectedIndexChanged method as expected - hit F5 to resume
8) Click the Button - you jump into the DropDownList's SelectedIndexChanged
method before jumping into the Button's Command method - that's bad, at
least, to my way of thinking. I would have expected the Page_Init to fire,
the Page_Load to fire and the Button's Command method to fire. I would have
expected the ViewState to remember the DropDownList's selection, but not its
SelectedIndexChanged method to fire.
Can anyone please confirm that this is a bug?
wonder if it is actually a bug or a "feature"
the rationale behind it...
Here's how to reproduce it.
1) Create a simple web page with an <asp
2) Create a SelectedIndexChanged method for the DropDownList and a Command
event for the Button
3) Add any single line of code to each event - just enough so you can set a
breakpoint
4) Populate the DropDownList in the Page_Init method - only a couple of
items will do, just enough to cause the event to fire.
5) Set a breakpoint in the SelectedIndexChanged method and the Command
method
6) Run the page in Debug mode
7) Select a different item in the DropDownList - you jump into its
SelectedIndexChanged method as expected - hit F5 to resume
8) Click the Button - you jump into the DropDownList's SelectedIndexChanged
method before jumping into the Button's Command method - that's bad, at
least, to my way of thinking. I would have expected the Page_Init to fire,
the Page_Load to fire and the Button's Command method to fire. I would have
expected the ViewState to remember the DropDownList's selection, but not its
SelectedIndexChanged method to fire.
Can anyone please confirm that this is a bug?