asp.net: moving from session variables to cookies
<p>My forms are losing session variables on shared hosting very quickly (webhost4life), and I think I want to replace them with cookies. Does the following look reasonable for tracking an ID from form to form:</p>

<pre><code>if(Request.Cookies["currentForm"] == null)
   return;
projectID = new Guid(Request.Cookies["currentForm"]["selectedProjectID"]);
Response.Cookies["currentForm"]["selectedProjectID"] = Request.Cookies["currentForm"]["selectedProjectID"];
</code></pre>

<p>Note that I am setting the Response cookie in all the forms after I read the Request cookie. Is this necessary? Do the Request cookies copy to the Response automatically?</p>

<p>I'm setting no properties on the cookies and create them this way:</p>

<pre><code>Response.Cookies["currentForm"]["selectedProjectID"] = someGuid.ToString();
</code></pre>

<p>The intention is that these are temporary header cookies, not persisted on the client any longer than the browser session. I ask this since I don't often write websites.</p>
