3
I am passing the parameter below (client), from a jQuery function to a Action, through the command $.post
(as shown below).
The parameter arrives correctly in my action, but I cannot return to View that I desire. Probably, the $.post
is waiting for this return, so the View is not loaded.
Does anyone know if there is a way to disable this return to $.post
, or any other suggestion so that I can carry my View?
The function jQuery:
function CriarCliente() {
var cliente =
{
CLIENTE_NOME: $('#CRIARCLIENTE_NOME').val().trim().toUpperCase(),
CLIENTE_RG: $('#CRIARCLIENTE_RG').val().trim()
}
var urlDestino = "/CadastroPessoa/Cliente/CriarCliente";
$.post(urlDestino, { cliente: cliente })
}
The Controller:
public ActionResult CriarCliente(ClienteEnt cliente)
{
.........CÓDIGO.....
return View("ListarCliente", cliente);
}
In case, I can’t load the View.
Thank you all.