I am invoking a void method by using JQuery ajax call as below:
var options = {
url: "/Account/Login",
data: formvalues,
type: "post"
};
$.ajax(options).done(function () {
// how to redirect the user to home page?
});
I want to redirect the user to the home page after he is logged in. Is there a way to accomplish this in jQuery? I tried window.location.replace
, but it simply displays the page without maintaining any history as such. Is there any other way to do it?