Hi,
Since the new value of the ddl is not yet posted back to the server, in the code behind, the server doesn't know the newly selected value on the client-side.
What you can do is set the AutoPostBack property of the ddl to true. This will make it postback the newly selected value to the server when the index is changed. Ok, normally you would have a full page refresh, but since the dll is on an updatepanel, only the panel gets refreshed.
You should keep in mind that, when the ddl value is changed, and the button in clicked very fast after the ddl-value-change, then on the server-side it is possible that you still work with the old value. That's why you should also do some sort of button disabling when the updatepanel gets refreshed.
Hope this helps!
Wim
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.