Home
Manage Your Code
Snippet: Get all cookies and output to Label (C#)
Title: Get all cookies and output to Label Language: C#
Description: Outputs cookies to label, but that can be changed to whatever you need. Views: 227
Author: David Ashworth Date Added: 10/5/2007
Copy Code  
1 HttpCookieCollection hc = new HttpCookieCollection();
2            hc = Request.Cookies;
3            lOutput.Text = "";
4            foreach (String sc in hc)
5            {
6                HttpCookie c = hc[sc];
7                lOutput.Text += c.Value.ToString();
8            }