C#
public bool BufferOutput { get; set; }
Visual C++
public: property bool BufferOutput { bool get (); void set (bool value); }
J#
/** @property */ public boolean get_BufferOutput() /** @property */ public void set_BufferOutput(boolean value)
JScript
public function get BufferOutput () : boolean public function set BufferOutput (value : boolean)
示例
<!---->
下面的示例将响应的 ContentType 属性设置为 image/jpeg,调用 Clear 方法以移除可能附加到响应的其他内容,然后将 BufferOutput 属性设置为 true,这样就可以在将任何内容发送到请求客户端之前先处理整个页。
有关完整示例,请参见 HttpResponse 类。
Visual Basic
' Set the page's content type to JPEG files ' and clear all response headers. Response.ContentType = "image/jpeg" Response.Clear() ' Buffer response so that page is sent ' after processing is complete. Response.BufferOutput = True
C#
// Set the page's content type to JPEG files // and clear all response headers. Response.ContentType = "image/jpeg"; Response.Clear(); // Buffer response so that page is sent // after processing is complete. Response.BufferOutput = true;