I want to add Dropdownlist in my MVC application but I have an error.
CS0135: 'Model' conflicts with the declaration 'System.Web.Mvc.WebViewPage.Model'
This is my razor code for dropdownlist
@Html.DropDownListFor(a => a.UserId, new SelectList(Model.UserItems, "Id", "UserName"));
*Most of the reference said I cannot use Model in select list. But I cannot rename to others. Kindly support if you have any ways.


Vinay SinghRank #604 · 4K reputationPosted Jun 3, 2016, 3:47 AM EDT
aditya immadi144 reputationPosted Jun 3, 2016, 8:09 AM EDT