This is my sending function, I have taken from examples that I have seen in this forum
function enviarDatos() {
var params = {
valor1 : $("#usuario").val(),
valor2 : $("#clave").val()
};
$.ajax({
url: this.href,
type: "post",
data: params,
success: function (result) {
if (result.success) {
//Refresh
window.location.reload();
}
}
});
}
This is how I get it in the controller the debug goes through the RedirectToAction and ends the method, but does not redirect I have not found help regarding this issue in which I have no experience
public ActionResult Index(string usuario, string pass)
{
try
{
usuario = Request.Form.Get("valor1");
pass = Request.Form.Get("valor2");
bool valida = true;
//Usuario usu = new Usuario();
//valida = usu.ReadAll(usuario, pass);
if (valida)
{
return RedirectToAction("Inicio", "Inicio");
}