Cookie missing when called in a class
<p>Good day..!  I have some issue getting the value of my cookie when called in a class.. </p>

<p>here's my code in my default.aspx.. I can retrieve the value on the when inside the aspx page</p>

<pre><code>  HttpCookie myCookie = new HttpCookie("SAMPLE");
  myCookie["value"] = HttpUtility.UrlEncode(value);
  myCookie.Expires = DateTime.Now.AddDays(1d);
  Response.Cookies.Add(myCookie);

  if (Request.Cookies["SAMPLE"] != null)
        {
            string userSettings;
            if (Request.Cookies["SAMPLE"]["value"] != null)
            { userSettings = Request.Cookies["SAMPLE"]["value"]; }
 }
</code></pre>

<p>But when i called the cookie inside a class using this code        HttpUtility.UrlDecode(HttpContext.Current.Request.Cookies["SAMPLE"]["value"]) it doesn't have any value.. Any idea..? Hope to hear from you soon.. </p>

<p>Regards, </p>

<p>Link</p>
