Sourabh Dhiman

Sourabh Dhiman

  • 1.6k
  • 429
  • 17.5k

Bind Drop Down List.

Sep 26 2020 2:43 AM
I have bind drop down list but i have face a issue.
 
<div class="ms-form-group has-icon">
<label>Choose Category</label>
@Html.DropDownListFor(model => model.EducationImageCategoryName, Model.categoryMasters, "--Select Category--", new { @class = "form-control", @required = "required" })
</div>
@Html.ValidationMessageFor(model => model.EducationImageCategoryName, "", new { @class = "text-danger", @style = "color:red;!important" })
 
There is no ViewData item of type 'IEnumerable<SelectListItem>' that has the key EducationImageCategoryName

Brought to you by:

Answers (2)