How to retrieve from cookie in c#?
Answers (1)
Add AnswerExtract information from a cookie
Using the Request object, it is simple to obtain cookie values from cookies.
string User_name = string.Empty; string User_Id = string.Empty; HttpCookie reqCookies = Request.Cookies["userInfo"]; if (reqCookies != null) { User_name = reqCookies["UserName"].ToString(); User_Id = reqCookies["UserID"].ToString(); }