I have the following code:
@{
var st = //(minha lógica q retorna bool);
}
@Html.CheckBox("MeuNome",st,new { id = "MeuID", value = "MeuValor" })
I can not use the st
variable in the second method parameter ... I have already tried st, @st, @{st;}
and nothing. How can I use the variable to change the code as little as possible?
The above code is within @using(@Html.BeginForm()){