Response 缓存

Response 缓存


Response.ContentType ="image/gif";
Response.ClearHeaders(); 删除缓冲区html
Response.ClearContent();
Response.Write();
Response.Expires=5 设置缓存时间, 单位为分钟
Response.ExpiresAbsolute 设置缓存移出的绝对时间
 Response.Buffer=false  设置获取当前页面是否缓冲输出, false 下一点输出一点,true 下载完了, 再一次全部输出(主要是页面的信息多是, 出现的效果不同)
Response.Flush();  立即将缓冲输出去,
Response.End();  将当前缓冲区内容立即输出,并停止当前页的执行,下载多少 就先输出多少 ,
 以后的不要了

Response.Redist("") 转向
String aa=server.Mapth("~/a.xml").Tostring() 得到虚拟路径的物理路径
Response.WriteFile(aa)  输出xml 文件的内容

Server.HtmlDecode(Server.HtmlEncode("<script>alert('天啊')</script>));
对 js 的编码 解码

原文地址:https://www.cnblogs.com/skyshenwei/p/1642808.html