HttpResponse.Clear 方法  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
清除缓冲区流中的所有内容输出。
public:
 void Clear();public void Clear ();member this.Clear : unit -> unitPublic Sub Clear ()示例
以下示例设置 ContentType 对 image/jpeg 的响应的属性,调用 Clear 该方法以删除可能附加到响应的其他内容,然后将 BufferOutput 该属性设置为 true,以便在将任何内容发送到请求客户端之前处理完整的页面。
有关完整示例,请参阅 HttpResponse 该类。
    // Set the page's content type to JPEG files
    // and clears all content output from the buffer stream.
    Response.ContentType = "image/jpeg";
    Response.Clear();
    // Buffer response so that page is sent
    // after processing is complete.
    Response.BufferOutput = true;
' Set the page's content type to JPEG files
' and clears all content output from the buffer stream.
Response.ContentType = "image/jpeg"
Response.Clear()
' Buffer response so that page is sent
' after processing is complete.
Response.BufferOutput = True
注解
该方法 Clear 未清除标头信息。