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
611
129.3k
Set Cookies Value In MVC.
Mar 30 2020 2:45 AM
HttpCookie cookie = new HttpCookie("UserDetail");
try
{
//if (ModelState.IsValid == true)
//{
if (RememberMe == true)
{
cookie["FirstName"] = EmailId;
byte[] b = ASCIIEncoding.ASCII.GetBytes(Password);
String EncryptedPassword = Convert.ToBase64String(b);
cookie["Password"] = EncryptedPassword;
cookie.Expires = DateTime.Now.AddDays(1);
HttpContext.Response.Cookies.Add(cookie);
}
else
{
cookie.Expires = DateTime.Now.AddDays(-1);
HttpContext.Response.Cookies.Add(cookie);
}
I have set cookies value using c# code. But I want to get cookies value using jquery code.
like that-var emailId
var password=
Please solve my issue.
Reply
Answers (
3
)
What are all the things need to know in .net?
Asp.Net web application