- HttpCookie Class
- Detail : Link
- Cookie 實作
- Cookie建立:HttpCookie
Ex: HttpCookie myc1 = new HttpCookie("username1"); - Cookie設定:
Ex: myc1.Value = " " ; - Cookie存活時間設定: .Expires
Ex: myc1.Expires = DateTime.Now.AddHours(1); - Cooike儲存
Ex: Response.Cookies.Add(myc1);
- Cookie資料操作
- Cookie資料取出
Request.Cookies["txtChatdata"].Value - Cookie資料設定 - Response
- Response.Cookies["txtChatdata"].Value
Session介紹
- Session
- HttpSessionState Class
- Detail : Link
- Session 實作
- Session建立 : Session["變數名稱"]
Ex: Session["username1"] = username1.Text - Session使用:Session["變數名稱"]
Ex:Session["txtChatdata"] = "";
沒有留言:
張貼留言