gpt4 book ai didi

c# - 将 <input> 更改为 @Html.RadioButtonFor?

转载 作者:太空宇宙 更新时间:2023-11-03 21:14:25 25 4
gpt4 key购买 nike

很简单的问题,但很难找到答案。我如何转换

<input type="radio" id="radAnswer" name="answer" value="@answer" />

@Html.RadioButtonFor(/*some sort of code in here*/)

提前致谢!

最佳答案

有点像

  @Html.RadioButtonFor(x => x.answer, your value, new { @id= "radAnswer" , @class="any"})

对于新的属性定义,比如选中的单选按钮

 new { Checked = "checked"}

关于c# - 将 &lt;input&gt; 更改为 @Html.RadioButtonFor?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35405253/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com