现在的位置: 首页 > 综合 > 正文

C# 禁止ashx自动缓存的方法

2018年02月09日 ⁄ 综合 ⁄ 共 223字 ⁄ 字号 评论关闭

  public void ProcessRequest(HttpContext context)
  {
   context.Response.Cache.SetNoStore();
   context.Response.Clear();
   context.Response.ContentType = "text/xml";

   //you code...

   context.Response.Write(TreeView1.GetXml());
  }

 

抱歉!评论已关闭.