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

适用于