HtmlContentBuilderExtensions.SetHtmlContent 方法

定义

重载

SetHtmlContent(IHtmlContentBuilder, IHtmlContent)

将内容设置为 IHtmlContent 值。

SetHtmlContent(IHtmlContentBuilder, String)

将内容设置为 String 值。 该值被视为按提供的 HTML 编码,不会执行进一步的编码。

SetHtmlContent(IHtmlContentBuilder, IHtmlContent)

Source:
HtmlContentBuilderExtensions.cs
Source:
HtmlContentBuilderExtensions.cs
Source:
HtmlContentBuilderExtensions.cs

将内容设置为 IHtmlContent 值。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Html::IHtmlContentBuilder ^ SetHtmlContent(Microsoft::AspNetCore::Html::IHtmlContentBuilder ^ builder, Microsoft::AspNetCore::Html::IHtmlContent ^ content);
public static Microsoft.AspNetCore.Html.IHtmlContentBuilder SetHtmlContent (this Microsoft.AspNetCore.Html.IHtmlContentBuilder builder, Microsoft.AspNetCore.Html.IHtmlContent content);
static member SetHtmlContent : Microsoft.AspNetCore.Html.IHtmlContentBuilder * Microsoft.AspNetCore.Html.IHtmlContent -> Microsoft.AspNetCore.Html.IHtmlContentBuilder
<Extension()>
Public Function SetHtmlContent (builder As IHtmlContentBuilder, content As IHtmlContent) As IHtmlContentBuilder

参数

content
IHtmlContent

替换 IHtmlContent 内容的值。

返回

IHtmlContentBuilder

适用于

SetHtmlContent(IHtmlContentBuilder, String)

Source:
HtmlContentBuilderExtensions.cs
Source:
HtmlContentBuilderExtensions.cs
Source:
HtmlContentBuilderExtensions.cs

将内容设置为 String 值。 该值被视为按提供的 HTML 编码,不会执行进一步的编码。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Html::IHtmlContentBuilder ^ SetHtmlContent(Microsoft::AspNetCore::Html::IHtmlContentBuilder ^ builder, System::String ^ encoded);
public static Microsoft.AspNetCore.Html.IHtmlContentBuilder SetHtmlContent (this Microsoft.AspNetCore.Html.IHtmlContentBuilder builder, string encoded);
static member SetHtmlContent : Microsoft.AspNetCore.Html.IHtmlContentBuilder * string -> Microsoft.AspNetCore.Html.IHtmlContentBuilder
<Extension()>
Public Function SetHtmlContent (builder As IHtmlContentBuilder, encoded As String) As IHtmlContentBuilder

参数

encoded
String

替换内容的 HTML String 编码。

返回

IHtmlContentBuilder

适用于