Share via


PrerenderTagHelper Class

Definition

Caution

Use Microsoft.AspNetCore.SpaServices.Extensions

A tag helper for prerendering JavaScript applications on the server.

public ref class PrerenderTagHelper : Microsoft::AspNetCore::Razor::TagHelpers::TagHelper
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement(Attributes="asp-prerender-module")]
public class PrerenderTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper
[Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement(Attributes="asp-prerender-module")]
[System.Obsolete("Use Microsoft.AspNetCore.SpaServices.Extensions")]
public class PrerenderTagHelper : Microsoft.AspNetCore.Razor.TagHelpers.TagHelper
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement(Attributes="asp-prerender-module")>]
type PrerenderTagHelper = class
    inherit TagHelper
[<Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElement(Attributes="asp-prerender-module")>]
[<System.Obsolete("Use Microsoft.AspNetCore.SpaServices.Extensions")>]
type PrerenderTagHelper = class
    inherit TagHelper
Public Class PrerenderTagHelper
Inherits TagHelper
Inheritance
PrerenderTagHelper
Attributes

Constructors

PrerenderTagHelper(IServiceProvider)

Creates a new instance of PrerenderTagHelper.

Properties

CustomDataParameter

An optional JSON-serializable parameter to be supplied to the prerendering code.

ExportName

If set, specifies the name of the CommonJS export that is the prerendering function to execute. If not set, the JavaScript module's default CommonJS export must itself be the prerendering function.

ModuleName

Specifies the path to the JavaScript module containing prerendering code.

Order

When a set of ITagHelpers are executed, their Init(TagHelperContext)'s are first invoked in the specified Order; then their ProcessAsync(TagHelperContext, TagHelperOutput)'s are invoked in the specified Order. Lower values are executed first.

(Inherited from TagHelper)
TimeoutMillisecondsParameter

The maximum duration to wait for prerendering to complete.

ViewContext

The ViewContext.

Methods

Init(TagHelperContext)

Initializes the ITagHelper with the given context. Additions to Items should be done within this method to ensure they're added prior to executing the children.

(Inherited from TagHelper)
Process(TagHelperContext, TagHelperOutput)

Synchronously executes the TagHelper with the given context and output.

(Inherited from TagHelper)
ProcessAsync(TagHelperContext, TagHelperOutput)

Executes the tag helper to perform server-side prerendering.

Applies to