1
This is the button that calls the Modal Bootstrap:
<button class="btn btn-default details" data-id="@item.nome"><i class="fas fa-street-view"></i></button>
This is the Modal Bootstrap page;
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title">Visitado em:</h4>
</div>
<div class="modal-body">
<p>@Html.DisplayName("Nome")</p>
<p>@Html.DisplayName("Data")</p>
<p>@Html.DisplayName("Relatório")</p>
<p>@Html.DisplayName("Cod Visita")</p>
@foreach (var item in Model)
{
<p>@Html.DisplayFor(modelItem => item.nome)</p>
<p>@Html.DisplayFor(modelItem => item.Fecha)</p>
<p>@Html.DisplayFor(modelItem => item.Relatorio)</p>
<p>@Html.DisplayFor(modelItem => item.id_visita)</p>
}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button>
</div>
</div><!-- /.modal-content -->
This is my controller;
DB_A3B4A6_estrangeirosEntities db2 = new DB_A3B4A6_estrangeirosEntities();
public ActionResult IndexVisitas(string searchString)
{
var estrangeiros = from e in db2.Vw_RegistroVisita select e;
if (!String.IsNullOrEmpty(searchString))
{
estrangeiros = estrangeiros.Where(s => s.nome.Contains(searchString));
}
return View(estrangeiros.ToList());
//return View(db2.Vw_RegistroVisita.ToList());
}
I apologize if it was not very clear or if more information was missing. I am new to programming.
I need to make it work using the variable.
That’s right, I changed it to $(this). date("id") . Thank you!
– DP WS Receptivo
@Dpwsreceptive does not forget brand as answered :)
– HudsonPH
Where do you mark "Answered"?
– DP WS Receptivo
on the left side of the answer, below the dots has a checkin image, so clikar on it :)
– HudsonPH