我有几个下拉模型,我需要添加引导窗体控件类。我正在努力转换这个字符串来接受这个类。将类添加到@ html.DropDownListFor
我会很感激的帮助。
我已经把
, new { @class = "form-control"}
无处不在的行没有成功。
@Html.DropDownListFor(model => model.SelectedSourceAccount, new
SelectList(Model.AllWithdrawalAccounts.Select(x => new {Value = x.Id, Text =
x.NameAndAvailableBalance}), "Value", "Text"), Model.SelectedSourceAccount)
不要给代码唯一的答案。简要解释答案,以便对其他人也有帮助。 – Ravimallya 2014-10-08 05:18:08