我有一个场景,我有3个单选按钮,其中两个有默认值,而第三个我希望它应该被分配一个文本框的值。我如何在下面实现这一点是我的一些代码:
<tr>
<td>
<label style="padding-bottom:0.5em;font-size:1em">
@Html.RadioButtonFor(model => model.LicenseValidityDuration, "0", new { style = "width:2em" })
Never
</label>
</td>
<td></td>
</tr>
<tr>
<td>
<label style="padding-bottom:0.5em;font-size:1em">
@Html.RadioButtonFor(model => model.LicenseValidityDuration, "-1", new { style = "width:2em" })
Always
</label>
</td>
<td></td>
</tr>
<tr>
<td>
<label style="padding-bottom:0.5em;font-size:1em">
@Html.RadioButtonFor(model => model.LicenseValidityDuration, model => model.LicenseValidityDuration, new { style = "width:2em" })
Days Before Expiry
</label>
</td>
<td>
@Html.EditorFor(model => model.LicenseValidityDuration)
</td>
</tr>