1
I have the following problem: I have a checkbox
on the page but even marking it, on controller
the Model
continues with the field lavagem = false
.
Model
public bool lavagem { get; set; }
View
@Html.CheckBoxFor(model => model.lavagem, htmlAttributes: new { id="chkLavagem" })
Could you show the controller method, especially the input parameters? It would also be interesting to show how Ubmit is doing from the view. Just with the code you put in, it’s very hard to imagine what might be going on.
– Marcus Vinicius
if you change
bool
forString
it returns different values?– Maicon Carraro
Can you put in your question the code of Action call on the Controller?
– Leonel Sanches da Silva