title: How can read / write cookie in C# & ASP.NET MVC
body: <p>I have problem with cookies, this is my read and write code in the class:</p>
  
  <pre><code>public static class language
  {
     public static void set_default(string name)
     {
         HttpContext.Current.Response.Cookies.Remove("language");
         HttpCookie language = new HttpCookie("language");
         language["name"] = name;
         language.Expires = DateTime.Now.AddDays(1d);
         HttpContext.Current.Response.Cookies.Add(language);
     }
  
     public static string get_default()
     {
         string name = string.Empty;
         HttpCookie langauge = HttpContext.Current.Response.Cookies.Get("language");
         name = langauge["name"];
         return name;
     }
  }
  </code></pre>
  
  <p>When I go to the next page and use <code>@language.get_default()</code> to get the default language, the response is <code>null</code> - why?</p>