RazorPage.FlushAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Invokes FlushAsync() on Output and Stream.FlushAsync on the response stream, writing out any buffered content to the Body.
public:
System::Threading::Tasks::Task<Microsoft::AspNetCore::Html::HtmlString ^> ^ FlushAsync();
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Html.HtmlString> FlushAsync ();
member this.FlushAsync : unit -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Html.HtmlString>
Public Function FlushAsync () As Task(Of HtmlString)
Returns
A Task<TResult> that represents the asynchronous flush operation and on completion returns an empty IHtmlContent.
Remarks
The value returned is a token value that allows FlushAsync to work directly in an HTML section. However the value does not represent the rendered content. This method also writes out headers, so any modifications to headers must be done before FlushAsync() is called. For example, call SetAntiforgeryCookieAndHeader() to send antiforgery cookie token and X-Frame-Options header to client before this method flushes headers out.