public static string CurrentKhachhangUsername { get { HttpRequest request = HttpContext.Current.Request; if (request.Cookies[".khachhangshj"] == null) { return string.Empty; } return request.Cookies[".khachhangshj"].Value; } set { HttpCookie cookie = new HttpCookie(".khachhangshj"); cookie.Expires = DateTime.Now.AddYears(1); cookie.Value = value; HttpContext.Current.Response.Cookies.Add(cookie); } }