Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
@html.radiobutton true ステータスを設定する必要があります。私は2つのラジオボタンを持っています。1 つは真の状態、もう 1 つは偽の状態です。どうすればいいですか?
ビューモデルを持つことができます:
public class MyViewModel { public bool Status { get; set; } }
ビューに 2 つの RadioButtons があります。
@Html.RadioButtonFor(x => x.Status, "true") @Html.RadioButtonFor(x => x.Status, "false")