Reputation: 397
Ive created a session timeout page, after a session time-outs this page is loaded, once loaded a 1 minute countdown begins which when it hits 0 calls the bellow JQuery.
$(this).on('finish.countdown', function (event) {
** Help Needed Here **
});
Inside this method I need to load my Login view located at Home/Login, the controller method looks like this :
[AllowAnonymous]
public ActionResult Login(string userName)
{
return View("Login");
}
An the question I feel guilty asking... How? , I cant seam to find anything about JQuery loading a cshtml view.
Upvotes: 1
Views: 36
Reputation: 2768
I think you can just do a redirect to that action. Something like this:
$(this).on('finish.countdown', function (event) {
window.location.href = "/Home/Login?userName=" + user;
});
Upvotes: 1