The first example doesn't add the cookie to the response, so it has no effect. The second example doesn't set the expiration.
HttpContext httpContext
= HttpContext.Current;
httpContext.Response.Cookies["_cookie"].Values["lang"] = "value";
httpContext.Response.Cookies["_cookie"].Expires = DateTime.Now.AddYears(1);