Share via


IComponentPrerenderer.PrerenderComponentAsync Method

Definition

Prerenders a Razor Component as HTML.

public System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Html.IHtmlAsyncContent> PrerenderComponentAsync (Microsoft.AspNetCore.Http.HttpContext httpContext, Type componentType, Microsoft.AspNetCore.Components.IComponentRenderMode renderMode, Microsoft.AspNetCore.Components.ParameterView parameters);
abstract member PrerenderComponentAsync : Microsoft.AspNetCore.Http.HttpContext * Type * Microsoft.AspNetCore.Components.IComponentRenderMode * Microsoft.AspNetCore.Components.ParameterView -> System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Html.IHtmlAsyncContent>
Public Function PrerenderComponentAsync (httpContext As HttpContext, componentType As Type, renderMode As IComponentRenderMode, parameters As ParameterView) As ValueTask(Of IHtmlAsyncContent)

Parameters

httpContext
HttpContext

The HttpContext.

componentType
Type

The type of component to prerender. This must implement IComponent.

renderMode
IComponentRenderMode

The mode in which to prerender the component.

parameters
ParameterView

Parameters for the component.

Returns

A task that completes with the prerendered content.

Applies to