Как обнаружить нажатие кнопки «Назад»

Что-то близко к:

@Html.DropDownListFor(m => m.UserRole, 
   new SelectList(Model.Roles, "UserRoleId", "UserRole", Model.Roles.First().UserRoleId), 
   new { /* any html  attributes here */ }) 

Для заполнения DropDownListFor вам нужен SelectList. Для любых HTML-атрибутов, которые вам нужны, вы можете добавить:

new { @class = "DropDown", @id = "dropdownUserRole" }
0
задан Registered User 24 February 2015 в 23:27
поделиться