TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Guest User
Tech Writer
515
46.4k
About checking Cookies on page load
Aug 18 2020 4:54 PM
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
Reply
Answers (
1
)
How to take a subset of a views Model and send the subset model
Save functionality does not work