1
I have a link that calls a function JS (POPUP), in this popup I have a registration FORM, to validate all parameters of my form, I need to get the ID of My Model that is in the Link view I am not able to get this ID to insert data in the BD
Take a look at my Cod:
view:
<table>
<tr>
<th>Nome</th>
<th>Adicionar</th>
</tr>
@foreach (var c in Model.Contactados)
{
<tr>
<td>@Html.DisplayFor(cc => c.Nome)</td>
<td><a class ="chamar" href="#">Adicionar</a></td>
</tr>
}
form that should receive the ID of the previous view:
@using Forte.Rastreador.ViewModels
@model SuperViewModel
@using (Html.BeginForm("CadastrarContatoContactado", "Master", FormMethod.Post))
{
@Html.ValidationSummary(false)
<fieldset>
<legend></legend>
@Html.Label("Contato: ")
@Html.TextBoxFor(c=>c.DescricaoContatoContactado)
@Html.Label("Tipo Contato: ")
@Html.DropDownListFor(c => c.CodTipoContato, Model.TipoContatoList)
<input type="submit" value="Adicionar Contato" />
}
Dude, it’s a little confusing. Explain it better ? You want to get this ID on the link after it was registered ?
– Érik Thiago
yes that’s right, I’m not getting the id of the registered model.
– Hans Miller
Dude, try rephrasing your question.
– Abner Terribili
@Hansmiller Question solved? Consider marking an answer as accepted. How and why to accept an answer?
– Miguel Angelo