共用方式為


HtmlContentBuilderExtensions.SetHtmlContent 方法

定義

多載

SetHtmlContent(IHtmlContentBuilder, IHtmlContent)

將內容設定為 IHtmlContent 值。

SetHtmlContent(IHtmlContentBuilder, String)

將內容設定為 String 值。 此值會被視為 HTML 編碼為提供,而且不會執行進一步的編碼。

SetHtmlContent(IHtmlContentBuilder, IHtmlContent)

來源:
HtmlContentBuilderExtensions.cs
來源:
HtmlContentBuilderExtensions.cs
來源:
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)

來源:
HtmlContentBuilderExtensions.cs
來源:
HtmlContentBuilderExtensions.cs
來源:
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

適用於