我知道为空,但是Response.Cookies["name"].Value != null确是true.所以用我那个方法可以判断.
飘过~~
HttpCookie aCookie = new HttpCookie("text"); aCookie.Value = TextBox1.Text.Trim(); aCookie.Expires = DateTime.Now.AddDays(10); Response.Cookies.Add(aCookie);if (!string.IsNullOrEmpty(Response.Cookies["text"].Value))