I have the below code in MVC, Razor:
- @Html.DropDownListFor(model => model.SelectedEvent,
new SelectList(Model.Events, "Id", "Name"))
I'd like to add a new attribute for each option in the select called "description" which should be bound to the Event.Description.
How to achieve this?
I'd like to avoid creating a separate Html Helper. Would that be possible?