I would like to know how I can change the value of @Model still in the view, before sending it to the server and which is the best way to do this?
Example:
@{ var model = (Pessoa)Model bool isAtivo = pessoa.IsAtivo } @Html.TextBox("Ativo", @isAtivo, new{...}) Alterar Salvar
And if my item is a string how should it be done?
Example 2:
@{ var model = (Pessoa)Model string nome = pessoa.Nome } @Html.TextBox("Ativo", @nome, new{...}) Alterar Salvar