I have an Index screen, where is the table of registered people, on the same screen I have a new button that calls a Modal (boostrap) like this:
<a href="@Url.Action("Add", "Pessoa", new { area = "Gestor" })" class="btn btn-primary" data-toggle="modal" data-target="#modalPessoa">
<span class="glyphicon glyphicon-plus"></span> Novo
</a>
and the controller returns return PartialView("Partial/ModalPessoa");
The content of ModalPessoa is a form with several fields that are mandatory, when it is given submit goes to the controller that is this way:
if (ModelState.IsValid)
{
return RedirectToAction("Index");
}
return PartialView("Partial/ModalPessoa", model);
, but it returns only the partial without style or script none, instead of returning this partial into Modal, does anyone know how to return the contents of the partial into the modal with the validations done on the server?