Dela via


HtmlContentViewComponentResult Class

Definition

An IViewComponentResult which writes an IHtmlContent when executed.

public ref class HtmlContentViewComponentResult : Microsoft::AspNetCore::Mvc::IViewComponentResult
public class HtmlContentViewComponentResult : Microsoft.AspNetCore.Mvc.IViewComponentResult
type HtmlContentViewComponentResult = class
    interface IViewComponentResult
Public Class HtmlContentViewComponentResult
Implements IViewComponentResult
Inheritance
HtmlContentViewComponentResult
Implements

Remarks

The provided content will be HTML-encoded as specified when the content was created. To encoded and write text, use a ContentViewComponentResult.

Constructors

HtmlContentViewComponentResult(IHtmlContent)

Initializes a new HtmlContentViewComponentResult.

Properties

EncodedContent

Gets the encoded content.

Methods

Execute(ViewComponentContext)

Writes the EncodedContent.

ExecuteAsync(ViewComponentContext)

Writes the EncodedContent.

Applies to