hello,
Hope everyone is doing good.
I am working in mvc.
I have created cookie in browser after login.
So next time if i open login url in my browser, it should redirect to dashboard directly.
So i want to check cookies on login page load, i am trying this with below code :
- public ActionResult Login()
- {
- HttpCookie chkLoginCookie = Request.Cookies["Login"];
- if (chkLoginCookie != null)
- {
- return RedirectToAction("Home", "Dashboard");
- }
- else
- {
- return View();
- }
- }
But it keeps on spinning and later ask to delete cookies.
Thank you in adv