【问题标题】:adding custom header with classic asp使用经典 asp 添加自定义标题
【发布时间】:2010-03-15 18:19:26
【问题描述】:

我想知道是否可以使用经典 asp 添加自定义标题。换句话说,我正在寻找 .net 的 Response.AddHeader() 的经典 asp 等价物。


HttpContext.Response.AddHeader("customheadertruefalse","1");

【问题讨论】:

    标签: asp-classic


    【解决方案1】:

    使用Response.AddHeader(正如JohnFx 已经回答的那样)。 这是我的一个工作 ASP 页面的示例:

    Response.ContentType = "application/vnd.ms-excel"
    Response.AddHeader "Content-Disposition", "attachment; filename=ranking-export.csv"
    

    【讨论】:

    • 有没有办法为来自asp页面的响应添加一些响应头?像 asp.net 有客户标题部分。
    【解决方案2】:

    不想成为那个人,但你试过Response.AddHeader吗?

    【讨论】:

      猜你喜欢
      • 2023-03-14
      • 1970-01-01
      • 2014-05-25
      • 1970-01-01
      • 2017-11-16
      • 2014-05-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多