Response.Clear

(idea) by yossarianc Fri Oct 12 2001 at 16:12:56

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.

Example:

<%
  Response.Buffer = True
  Response.AddHeader = "MyHeader", "This is my header"
  Response.Write = "Hello World!"
  Response.Clear
%>
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.

Resources:
http://www.devguru.com/
http://msdn.microsoft.com/asp/

All code is my own (and is now known as "The Code Formerly Known As #FFFFCC").
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.