提交表格后如何保留单选按钮的选定值

时间:2019-01-23 04:00:32

标签: c# jquery ajax asp.net-mvc

提交表单后如何保留单选按钮的选定值

<tr>
    <td>肉芽組織</td>
    @for (int i = 0; i < Model.EsGranOptions.Count; i++)
    {
          NCODE option = Model.EsGranOptions[i];
          string radioId = "OpdEval.EsGran_" + option.NC_CODE;
          string radioName = "OpdEval.EsGran";
          string radioValue = option.NC_CODE;
          <td>
              <label>
                   <input id="@radioId" name="@radioName" type="radio" value="@radioValue">
                   @option.NC_NAME
              </label>
          </td>
     }                                    
</tr>
  @using (Html.BeginForm("AddOrUpdate", "OpdEval", new { area = "PDNurse" }, FormMethod.Post, new { @class = "form-inline", id = "HdRecordForm" })){}

我使用Html.BeginForm提交

0 个答案:

没有答案