title: Cannot find the cookies in asp.net c#
body: <p>I am creating a web page with .net 2.0 and I want to check if it is the first time visit for the user.</p>
  
  <p>I am using the code block in pageload():</p>
  
  <pre><code>String CookieName = "Cookie";
  String CookieValue = "TEST";
  if (Request.Cookies[CookieName] != null)
  {
  Label3.Visible = true;
  if (Request.Cookies[CookieName].Value == CookieValue)
  {
      Label3.Text = "Cookie already exists: " + Request.Cookies[CookieName].Value.ToString();
  }
  else 
      Label3.Text = "Cookie var içerisinde: " + Request.Cookies[CookieName].Value.ToString();
  }
  else
  {
  Label3.Visible = true;
  HttpCookie MyCookie=new HttpCookie(CookieName,CookieValue);
  Response.Cookies.Add(MyCookie);
  Label3.Text = "Cookie created. " + Request.Cookies[CookieName].Value.ToString();
  }
  </code></pre>
  
  <p>Everything seems to be working, as I run the code "Label3" becomes "Cookie created. Cookie". And after another postback "Label3" becomes "Cookie already exists. Cookie" as it should be.</p>
  
  <p>But I couldn't find my cookies anywhere in my local harddrive.(even if I didn't end the session)</p>
  
  <p>And after ending session and re-run the code, it starts again with "Cookie created. Cookie" which means it couldn't find the previous cookie.</p>
  
  <p>It is obvious that something is missing. I tried to add expry date and path to the cookie. None of them worked for me.</p>
  
  <p>Thank you in advance.</p>
  
  <p>Cagri</p>