June 2002
Intermediate to advanced
816 pages
28h 12m
English
ClearContent
Response.ClearContent( )
Clears the content of the current output stream.
None
The example writes a text message using Response.Write and then clears the buffered output by calling Response.Clear. If buffering is on, the text message will never be sent to the browser.
Sub Page_Load( )
Response.Write("This content will not be seen.")
Response.Clear( )
Message.Text = _
"Content written with <i>Response.Write</i> was cleared."
End SubThe ClearContent method clears all currently buffered output, but
does not clear the HTTP response headers. HTTP headers can be cleared
by calling the ClearHeaders method. If buffering of output has been
disabled by setting the BufferOutput property to
False, the ClearContent method will not have any
effect, since it only clears buffered content.
Read now
Unlock full access