我在cshtml中创建了以下单选按钮,但我无法运行' if'声明
<form method="post" id="Button">
<input type="radio" name="HomeBtn" value="Assembly"
id="AssemblyDrawings" checked/> Assembly Drawings
<input type="radio" name="HomeBtn" value="Literature"
id="RelatedLiterature"/> Related Literature
</form>
以下C#无效
@if(true) {
string things = String.Format("{0}", Request.Form["Button"]);
if (things == "Assembly") {
{
*do some stuff*
}
}