This documentation is archived and is not being maintained.

HttpResponse.ClearHeaders Method

Clears all headers from the buffer stream.

[Visual Basic]
Public Sub ClearHeaders()
[C#]
public void ClearHeaders();
[C++]
public: void ClearHeaders();
[JScript]
public function ClearHeaders();

Exceptions

Exception Type Condition
HttpException Headers are cleared after the HTTP headers have been sent.

Example

The following example clears all headers from the current buffer stream.

[Visual Basic] 
Response.ClearHeaders()
    

[C#] 
Response.ClearHeaders();
    

[C++] 
Response->ClearHeaders();


[JScript] 
Response.ClearHeaders()
    

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

HttpResponse Class | HttpResponse Members | System.Web Namespace

Show: