4
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) this way:
<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 like this:
if (ModelState.IsValid)
{
return RedirectToAction("Index");
}
return PartialView("Partial/ModalPessoa", model);
, but it returns only partial without style or script at all, instead of returning this partial into Modal, someone knows how to return the partial content into the modal with the validations made on the server?
Thiago are you using ajax? What you want is to load this content without refreshing the right page? Take a look here: http://answall.com/a/6634/129
– Sergio