lhstrong

博客园 首页 新随笔 联系 订阅 管理

//创建Cookie
     HttpCookie cookie = new HttpCookie("username");
     cookie.Value = "TEST";
    or HttpCookie cookie = new HttpCookie("username","TEST");
     cookie.Expires = DateTime.MaxValue;        
    Response.Cookies.Add(cookie);
 //读取Cookie
Request.Cookies["username"].ToString();

posted on 2009-04-02 16:19  SEA虎  阅读(173)  评论(0)    收藏  举报