Question : Which of these 2 cookies is mine? And what do they mean?

I run the attached program and see 2 new cookies were created.  But which is which?  And what do the fields mean?

[email protected][1].txt
==========
wlidperf
throughput=16&latency=187
live.com/
1088
2189574144
32107986
1613375088
30060172
*
MH
MSFT
live.com/
1024
2189574144
32107986
346888400
30058975
*
s_lastvisit
1265757724737
live.com/
1088
447624704
30279251
2966055696
30058974
*
ANON
A=80CD6DD07974958B9D5D02B6FFFFFFFF&E=924&W=1
live.com/
3584
2938331520
30098255
901556112
30090753
*


[email protected][1].txt
==========
MC1
V=3&GUID=455306b4905147d49ee2cee61c929530
msn.com/
1024
130824192
30914898
2627445584
30039096
*
MUID
9544AA811645472E9F5A1679CAA03C5C
msn.com/
1024
1142937600
30123775
485677568
30083542
*
ANON
A=80CD6DD07974958B9D5D02B6FFFFFFFF&E=924&W=1
msn.com/
3584
2938331520
30098255
901716112
30090753
*
__qca
P0-923684413-1266274899339
msn.com/
1088
2350186496
32111674
3571451312
30060178
*
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
defaults.aspx
=============
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Cookies</title>
</head>
<body runat="server" id="BodyTag">
    <form id="form2" runat="server">
    <asp:DropDownList runat="server" id="ColorSelector" autopostback="true" onselectedindexchanged="ColorSelector_IndexChanged">
        <asp:ListItem value="White" selected="True">Select color...</asp:ListItem>
        <asp:ListItem value="Red">Red</asp:ListItem>
        <asp:ListItem value="Green">Green</asp:ListItem>
        <asp:ListItem value="Blue">Blue</asp:ListItem>
    </asp:DropDownList>
    </form>
</body>
</html>

defaults.aspx.cs
================
using System;
using System.Data;
using System.Web;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.Cookies["BackgroundColor"] != null)
        {
            if (!Page.IsPostBack)
            {
                ColorSelector.SelectedValue = Request.Cookies["BackgroundColor"].Value;
            }
            BodyTag.Style["background-color"] = ColorSelector.SelectedValue;
        }
    }

    protected void ColorSelector_IndexChanged(object sender, EventArgs e)
    {
        BodyTag.Style["background-color"] = ColorSelector.SelectedValue;
        HttpCookie cookie = new HttpCookie("BackgroundColor");
        cookie.Value = ColorSelector.SelectedValue;
        cookie.Expires = DateTime.Now.AddHours(0.02);
        Response.Cookies.Add(cookie);
    }
}

Answer : Which of these 2 cookies is mine? And what do they mean?

1.) Yes, Request and Response objects are created automatically.
2.) Yes, the cookie travels with the Request object.
Random Solutions  
 
programming4us programming4us