TagHelperOutput 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
用于表示 的输出的 ITagHelper类。
public ref class TagHelperOutput : Microsoft::AspNetCore::Html::IHtmlContentContainer
public class TagHelperOutput : Microsoft.AspNetCore.Html.IHtmlContentContainer
type TagHelperOutput = class
interface IHtmlContentContainer
interface IHtmlContent
type TagHelperOutput = class
interface IHtmlContent
interface IHtmlContentContainer
Public Class TagHelperOutput
Implements IHtmlContentContainer
- 继承
-
TagHelperOutput
- 实现
构造函数
TagHelperOutput(String, TagHelperAttributeList, Func<Boolean,HtmlEncoder,Task<TagHelperContent>>) |
实例化 TagHelperOutput 的新实例。 |
属性
Attributes |
HTML 元素的属性。 |
Content |
获取或设置 HTML 元素的main内容。 |
IsContentModified |
|
PostContent |
HTML 元素的帖子内容。 |
PostElement |
HTML 元素后面的内容。 |
PreContent |
HTML 元素的预内容。 |
PreElement |
HTML 元素之前的内容。 |
TagMode |
生成的 HTML 中元素的语法。 |
TagName |
HTML 元素的标记名称。 |
方法
GetChildContentAsync() |
异步执行子级并返回其呈现的内容。 |
GetChildContentAsync(Boolean) |
异步执行子级并返回其呈现的内容。 |
GetChildContentAsync(Boolean, HtmlEncoder) |
使用范围内给定 |
GetChildContentAsync(HtmlEncoder) |
使用范围内给定 |
Reinitialize(String, TagMode) |
清除 并使用 TagHelperOutput 提供的值更新其状态。 |
SuppressOutput() |
更改 TagHelperOutput 以不生成任何内容。 |
WriteTo(TextWriter, HtmlEncoder) |
通过使用指定的 |
显式接口实现
IHtmlContentContainer.CopyTo(IHtmlContentBuilder) |
用于表示 的输出的 ITagHelper类。 |
IHtmlContentContainer.MoveTo(IHtmlContentBuilder) |
用于表示 的输出的 ITagHelper类。 |
扩展方法
AddClass(TagHelperOutput, String, HtmlEncoder) |
将给定 |
CopyHtmlAttribute(TagHelperOutput, String, TagHelperContext) |
将用户提供的属性从 |
MergeAttributes(TagHelperOutput, TagBuilder) |
将给定 |
RemoveClass(TagHelperOutput, String, HtmlEncoder) |
从 |
RemoveRange(TagHelperOutput, IEnumerable<TagHelperAttribute>) |
从 的 中移除给定 |
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈