2
I have the following code:
@{
var st = //(minha lógica q retorna bool);
}
@Html.CheckBox("MeuNome",st,new { id = "MeuID", value = "MeuValor" })
I can’t use the variable st
in the second parameter of the method... I’ve tried st, @st, @{st;}
and nothing. How can I use the variable in order to change the code less possible?
The code above is inside a @using(@Html.BeginForm()){
It worked. Thank you!
– Carol