I've created a web application with a dropdownlist. The instant a selection is made (using the OnSelectedIndexChanged event to call a method in my code) I am querying a database using the information obtained from the selection, which takes a few seconds. If I change that dropdownlist selection again while the query is executing, I receive the following error:
"There is already an open DataReader associated with this Command which must be closed first."
This makes sense since it is already working on the first query and by changing the selection it tries to start another query.
What I'd like to be able to do is disable the dropdownlist after a selection is made until the query finishes and the page reloads. Disabling the dropdownlist in the event handling method doesn't seem to work which leads me to believe that it doesn't update the control until a post back occurs.
So, in summary, is there a way to disable a cont ...
Go to the complete details ...