ASP Response Object : Clear Method

The Clear method erases any buffered HTML output. It does not erase the response headers, only the HTML body. If Response.Buffer has not been set to True1 then this will result in a run-time error.


  Response.Buffer = True
  Response.AddHeader = "MyHeader", "This is my header"
  Response.Write = "Hello World!"
In the above example, the Clear method would erase "Hello World!" from the buffer, so it would never be displayed to the end user. "MyHeader" would still be sent to the client's browser, since it is in the response headers.

Back to the ASP Response Object
Back to ASP Objects
1 In IIS 5.0, buffering is True by default.


All code is my own (and is now known as "The Code Formerly Known As #FFFFCC").

Log in or register to write something here or to contact authors.