I'm developing an applications, it involves a dropdownlist with image and text in MVC4. For instance, displaying image (Country Flag) with name of the country. I've used AutoMapper, IEnumerable. It says error as AutoMapperMappingExtensions was unhandled by user.
Description as
Missing type map configuration or unsupported mapping.
Mapping types:
Country -> ImageSelectListItem
MvcWebRole.Models.Country -> System.Web.Mvc.Html.ImageSelectListItem
Destination path:
IEnumerable`1[0]
Source value:
MvcWebRole.Models.Country
The occurance of error in Controller as
Mapper.Map<IEnumerable<Country>, IEnumerable<ImageSelectListItem>>(countryList)
index.cshtml
@Html.DropDownListFor
In cshtml error description as
The type arguments for method
'System.Web.Mvc.html.ImageselectExtensions.dropdownlistfo<TModel,TProperty> (
System.Web.mvc.htmlhelper<TModel>,
System.Linq.Expression<System.Func<TModel,TProperty>>,
string,
System.Collections.Generic.IEnumerable<System.Web.Mvc.Html.ImageSelectListItem>,
Object)'
cannot be inferred from the usage. Try Specifying the type arguments explicitly.