//存储cookie
HttpCookie UserCookie = new HttpCookie("login");
UserCookie["id"] = DesHelper.EncryptDES(txtUserName.Text.Trim(), "123456");//加密
UserCookie["user"] = DesHelper.EncryptDES(txtUserName.Text.Trim(), "123456");
//UserCookie["pass"] = Config.md5(txtUserPwd.Text.Trim());
UserCookie.Expires = DateTime.Now.AddDays(365d);
HttpContext.Current.Response.Cookies.Add(UserCookie);
//获取cookie
string wfbUserID = HttpContext.Current.Request.Cookies["login"].Values["id"];