Home > DeveloperSection > Forums > How to get the cookie value in asp.net
marcel ethan
marcel ethan

Total Post:105

Posted on    August-25-2014 2:03 AM

 ASP.Net ASP.Net 

 1 Reply(s)
 690  View(s)
Rate this:

I am creating a cookie and storing the value of username after succesfull login. How can I access the cookie when the website is opened. If the cookie exist I want to fill the username text box from the cookie value. And how to decrypt the value to get the username. I am doing server side validation by getting the userdetails from the database.

I am using vs 2010 with c#

Sumit Kesarwani

Total Post:378

Posted on    August-25-2014 2:28 AM

Hi marcel, 

You may use Request.Cookies collection to read the cookies.



   var value=Request.Cookies["key"].Value;


Don't want to miss updates? Please click the below button!

Follow MindStick