我有一个这样的单选按钮列表:
<%=Html.RadioButtonFor(m => m.Gender,"Male")%>
我希望默认选中此按钮.我该怎么做呢?
<%: Html.RadioButtonFor(x => x.Gender,"Male",new { @checked = "checked" }) %>
或者在呈现此视图的控制器操作中:
model.Gender = "Male";
return View(model);
原文链接:https://www.f2er.com/aspnet/248075.html