ContentViewComponentResult Class

Definition

An IViewComponentResult which writes text when executed.

C#
public class ContentViewComponentResult : Microsoft.AspNetCore.Mvc.IViewComponentResult
Inheritance
ContentViewComponentResult
Implements

Remarks

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

Constructors

Properties

Content

Gets the content.

Methods

Execute(ViewComponentContext)

Encodes and writes the Content.

ExecuteAsync(ViewComponentContext)

Encodes and writes the Content.

Applies to

Tuote Versiot
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0