Goal: Retrieve view value for controller [HttpPost]
I created a generic class with gets and sets
public int ListarDadosCarteira_Resultado { get; set; }
public string ListarDadosCarteira_Descricao { get; set; }
public int ListarDadosCarteira_Total { get; set; }
Updating !! Loading View Full usage two model is only one because I took the second one for testing.
@model Tuple<Generic>
@{
ViewBag.Title = "Index";}
<div class="painel">
<div class="painel-header">
<div class="painel-header-text-search">Carteira Mapa</div>
</div>
<div class="painel-content">
@using (Html.BeginForm())
{
<fieldset>
<legend>Index</legend>
@Html.TextBoxFor(model => model.Item1.ListarDadosCarteira_Total , new { @class = "newText" })
@Html.TextBoxFor(model => model.Item1.ListarDadosCarteira_Descricao , new { @class = "newText" })
@Html.TextBoxFor(model => model.Item1.ListarDadosCarteira_Resultado , new { @class = "newText" })
<div class="field-row">
<div class="editor-label">
<div class="posicao-botao">
<input type="submit" value="Pesquisar" class="button-search" title="Pesquisar Funcionario Fixa" />
</div>
</div>
</div>
</fieldset>
}
</div>
</div>
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}
Now comes my question as I retrieve the value entered when I perform a [HttpPost]?
I usually bring it like this.
[HttpPost]
public ActionResult Index(Generic generica)
{
}
But your self does not bring me values.