adding custom header with classic asp

China☆狼群 提交于 2019-12-23 07:44:27

问题


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().

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


回答1:


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"



回答2:


Don't mean to be that guy, but have you tried Response.AddHeader?



来源:https://stackoverflow.com/questions/2444579/adding-custom-header-with-classic-asp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!