Tuesday, November 24, 2009

Clear dropdown index...

Finally found the solution to the following error :

Server Error in '/' Application.
Cannot have multiple items selected in a DropDownList.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Cannot have multiple items selected in a DropDownList.

Solution:
You just set the dropdownlist.SelectedIndex = -1;

Thats all folks !!!


No comments: