Writing a cookie from a static class
<p>I have a static class in my solution that is basically use a helper/ultility class.</p>

<p>In it I have the following static method:</p>

<pre><code>// Set the user
    public static void SetUser(string FirstName, string LastName)
    {
        User NewUser = new User { Name = String.Format("{0}{1}", FirstName, LastName) };
        HttpCookie UserName = new HttpCookie("PressureName") { Value = NewUser.Name, Expires = DateTime.Now.AddMinutes(60) };       

    }
</code></pre>

<p>User is a simple class that contains:</p>

<pre><code>  String _name = string.Empty;

    public String Name
    {
        get { return _name; }
        set { _name = value; }
    }
</code></pre>

<p>Everything works up until the point where I try to write the cookie "PressureName" and insert the value in it from NewUser.Name. From stepping through the code it appears that the cookie is never being written.</p>

<p>Am I making an obvious mistake? I'm still very amateur at c# and any help would be greatly appreciated.</p>
