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.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for