开发者

Use of Response.Flush before Response.End

When to use Response.Flush? Do I need to call it every time before I call 开发者_运维百科Response.End?


The Response.Flush method is used when you want to flush part of the content before the rest of the page. To have any effect response buffering has to be turned off, and you have to output the page content yourself using Response.Write rather than using aspx markup.


You don't need to call Respond.End in most cases. If you do, you have to know about your case and why are you calling Respond.End and about Flush. It is very case specific.

Also, MSDN cleared it out:

If Response.Buffer is set to TRUE, calling Response.End flushes the buffer. If you do not want output returned to the user, you should first call Response.Clear.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜