Home » ASP.NET18 February 2009

ASP.NET Error : An HtmlSelect cannot have multiple items selected when Multiple is false.

This error might occur if you have selected your selection list (dropdownlist) multiple times. You can add multiple=”true”, e.g. <select Multiple=”true”> in your selection list so as to enable multiple item select.

If you don’t want your selection list to be multiple select enabled then you have to check whether you have selected the selection list multiple times either in your design (aspx file) or in code (aspx.cs file).

If you have populated the dropdownlist from code (dynamically) then check it once again.

I had this problem occured during one of my project because i had populated the dropdownlist dynamically in Page_Load. I got rid of this error after putting the dropdownlist population code inside if(!IsPostBack) condition.

Thanks.

ASP.NET

Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed