c#(c#)

内置对象 Request Response Session Cookie Application Server请求 响应 会话 客户端数据 当前网站对象 服务器对象/向客户端输入内容

Response.Write(“hello word”);

清理cookie的特定值,使用过期方式 Response.Cookies.Add(new HttpCookie(name: “token”) { Value = “abc”, Expires = DateTime.Now.AddDays(-1) });

Session储存重要数据 如账号密码,安全

Cookie不安全

 清理cookie的特定值,Session.Abandon();

清理cookie的特定值,使用过期方式

Response.Cookies.Add(new HttpCookie(name: “token”) { Value = “abc”, Expires = DateTime.Now.AddDays(-1) });

//路径不变,内容变化 //Server.transfer 转发 //Server.MapPath //Server.HtmlEncode //Server.HtmlDecode //Server.UrlEncode //Server.UrlDecode

————————

Built in object request response session cookie application server request response session client data current website object server object / input content to client

Response.Write(“hello word”);

清理cookie的特定值,使用过期方式 Response.Cookies.Add(new HttpCookie(name: “token”) { Value = “abc”, Expires = DateTime.Now.AddDays(-1) });

Session stores important data, such as account and password, which is secure

Cookies are not secure

Clear the specific value of the cookie, session. Abandon();

Clear the specific value of the cookie and use the expiration method

Response.Cookies.Add(new HttpCookie(name: “token”) { Value = “abc”, Expires = DateTime.Now.AddDays(-1) });

//路径不变,内容变化 //Server.transfer 转发 //Server.MapPath //Server.HtmlEncode //Server.HtmlDecode //Server.UrlEncode //Server.UrlDecode