首先,我必须在 mvc3 局部视图中创建一些单选按钮。
当我在屏幕上时,我只需要选择一个单选按钮并检索一个特定值。
我该怎么做(例如使用 JS 或 C#)?
<div id="UserDeleteInfosField">
<p>
@Html.RadioButton("HasUserLeave", new { id = "rb1" })
@UserAccountResources.UserLeave
@Html.HiddenFor(x => x.UserLeave)
</p>
<br />
<p>
@Html.RadioButton("HasUserTransfer", new { id = "rb2" })
@UserAccountResources.UserTransfer
@Html.HiddenFor(x => x.UserTransfer)
</p>
<br />
<p>
@Html.RadioButton("HasUserDetachment", new { id = "rb3" })
@UserAccountResources.UserDetachment
@Html.HiddenFor(x => x.UserDetachment)
</p>
<br />
<p>
@Html.RadioButton("HasUserRetirement", new { id = "rb4" })
@UserAccountResources.UserRetirement
@Html.HiddenFor(x => x.UserRetirement)
</p>
<br />
<p>
@Html.RadioButton("HasUserStatus", new { id = "rb5" })
@UserAccountResources.UserStatus
@Html.HiddenFor(x => x.UserStatus)
</p>
</div>
提前致谢 !
Ars_n