-1
MVCに強く型付けされたラジオボタンがあります。値をモデルプロパティに保存する方法選択した値のラジオボタンをコントローラに渡すにはどうすればいいですか?
<ul class="formlist">
<li class="width100">
<div class="form-check form-check-inline">
<label class="form-check-label">
@Html.RadioButtonFor(model => model._Account[i].account_flag, 1, new { @id = Model._Service[i].service_id, @Name = "text" + @Model._Service[i].service_id, @checked = "false" })<span>Yes</span>
</label>
</div>
<div class="form-check form-check-inline">
<label class="form-check-label">
@Html.RadioButtonFor(model => model._Account[i].account_flag, 0, new { @id = Model._Service[i].service_id, @Name = "text" + @Model._Service[i].service_id, @checked = "checked" })<span>No</span>
</label>
</div>
</li>
</ul>
コントローラへの投稿、account_flagプロパティがまだnullです –
コントローラとモデルコードのgetメソッドとpostメソッドを共有してください – John