protected void Page_Load(object sender, System.EventArgs e) { tips = Class.Tips.GetTips(); Class.Tips.ClearTips(); if (tips == null) { tips = new ADeeWu.HuoBi3J.Web.Class.Tips("", "", "", ""); } //DataBase db = DataBase.Context; //db.Select("select * from Users where id=@id"); //string s = ADeeWu.HuoBi3J.Libary.Security.DESEncrypt.Encrypto("http://forumn.lidas.us/topics?id=1", "1ff8e4fe-c9d6-41e0-8922-b902938e3c71"); //string s2 = ADeeWu.HuoBi3J.Libary.Security.DESEncrypt.Decrypto(s); }
public static void SetTips(Tips tips) { HttpCookie cookie = new HttpCookie("Tips"); cookie["Topic"] = HttpUtility.UrlEncode(tips.Topic); cookie["Summary"] = HttpUtility.UrlEncode(tips.Summary); cookie["Url"] = HttpUtility.UrlEncode(tips.Url); cookie["UrlText"] = HttpUtility.UrlEncode(tips.UrlText); //cookie.Expires = DateTime.Now.AddSeconds(10); HttpContext.Current.Response.Cookies.Add(cookie); }