使用值ng-model而不是SelectedIndex设置DropDownListFor

时间:2015-07-21 09:10:27

标签: javascript asp.net-mvc angularjs asp.net-mvc-views

我在MVC视图中有DropDownListFor,使用以下行:

  @Html.DropDownListFor(m => m.UserOffice, Enumerable.Empty<SelectListItem>(), new { @class = "form-control", data_ng_model = "OfficeID", data_ng_options = "I.Id as I.Name  for I in OfficeList", @id = "UserOffice" })

我需要在“m.UserOffice”中存储“data_ng_model”值而不是选择索引。

我该怎么办?

0 个答案:

没有答案
相关问题