Latest web development tutorials

ASP AddHeader method

Response Object Reference Complete Response Object Reference

AddHeader method to add a new HTTP response HTTP header and value.

Note: Once the header is added, it can not be deleted.

NOTE: In IIS 4.0, you need to call this method sent to the browser before any output.In IIS 5.0, you can invoke a method in the script AddHeader any point, as long as it is prior to the call to response.Flush methods.

grammar

response.AddHeader name,value

参数 描述
name 必需。新头部变量的名称(不能包含下划线)。
value 必需。新头部变量的初始值。


Examples

<%Response.AddHeader "WARNING","Error message text"%>


Response Object Reference Complete Response Object Reference