This documentation is archived and is not being maintained.
HttpResponse.AddHeader Method
.NET Framework 1.1
Adds an HTTP header to the output stream.
AddHeader is provided for compatibility with previous versions of ASP.
[Visual Basic] Public Sub AddHeader( _ ByVal name As String, _ ByVal value As String _ ) [C#] public void AddHeader( string name, string value ); [C++] public: void AddHeader( String* name, String* value ); [JScript] public function AddHeader( name : String, value : String );
Parameters
- name
- The name of the HTTP header to add value to.
- value
- The string to add to the header.
Remarks
AddHeader is the same as AppendHeader and is provided only for compatibility with previous versions of ASP. With ASP.NET, use AppendHeader.
Example
[Visual Basic] Response.Addheader("CustomHeader", "xxxx") [C#] Response.AddHeader("CustomHeader", "xxxx"); [C++] Response->AddHeader(S"CustomHeader", S"xxxx"); [JScript] Response.AddHeader("CustomHeader", "xxxx")
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
See Also
HttpResponse Class | HttpResponse Members | System.Web Namespace
Show: