Dela via


ContentViewComponentResult Class

Definition

An IViewComponentResult which writes text when executed.

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

Remarks

The provided content will be HTML-encoded when written. To write pre-encoded content, use an HtmlContentViewComponentResult.

Constructors

ContentViewComponentResult(String)

Initializes a new ContentViewComponentResult.

Properties

Content

Gets the content.

Methods

Execute(ViewComponentContext)

Encodes and writes the Content.

ExecuteAsync(ViewComponentContext)

Encodes and writes the Content.

Applies to