共用方式為


HtmlContentBuilderExtensions.SetContent(IHtmlContentBuilder, String) 方法

定義

將內容設定為 String 值。 此值會被視為未編碼為提供,而且會在寫入輸出之前進行 HTML 編碼。

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

參數

unencoded
String

String取代內容的 值。

傳回

IHtmlContentBuilder

適用於