Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Add support for flush points in Razor pages #1042

Closed
pranavkm opened this issue Aug 20, 2014 · 0 comments
Closed

Add support for flush points in Razor pages #1042

pranavkm opened this issue Aug 20, 2014 · 0 comments
Assignees
Milestone

Comments

@pranavkm
Copy link
Contributor

By default Razor pages buffer output in memory. This is required for the a view is rendered - first a page is executed, the page specifies the Layout and additionally sets up properties in the ViewBag \ ViewData that the Layout would consume (page title, sections etc). Consequently, no byte is written to the output until the entire page is rendered.

Flush points would allow for switching to directly writing to the output when we encounter a invocation

<- Buffered section -->
<html>  
<head>
   <link type="text/css" href="bootstrap.css" />
   <title>@Page.Title</title>
</head>
<-- Flush buffered content to response and no longer buffer content -->
@FlushAsync() 
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants