How to bufferise the response from the action?
问题 How can I send some part of the web response without waiting the all rendering process finish? I prefer do that in an Action. I used to use Response.Buffer = false; in .net 2.0 but now with MVC 3 I don't know how to do that. 回答1: You can potentially use an Action Filter to set the Buffer property. public class BufferActionFilter: ActionFilterAttribute { public override void OnActionExecuting(ActionExecutingContext filterContext) { filterContext.HttpContext.Response.Buffer = true; } } PS: I