与传统的ASP添加自定义页眉 [英] adding custom header with classic asp

查看:124
本文介绍了与传统的ASP添加自定义页眉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在想,如果它可能用传统的ASP添加自定义标题。换句话说,我在寻找传统的ASP .NET等价的Response.AddHeader()的。

I was wondering if its possible to add custom header with classic asp. In other words, I am looking for classic asp equivalent of .net's Response.AddHeader().

即。结果
HttpContext.Response.AddHeader(customheadertruefalse,1);

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

推荐答案

使用 Response.AddHeader (如JohnFx已回答)。
下面是示例从我工作的ASP页面之一:

Use Response.AddHeader (as JohnFx already answered). Here is sample from one of my working asp pages :

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

这篇关于与传统的ASP添加自定义页眉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆