IComponentPrerenderer.PrerenderComponentAsync 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.
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.