TagHelperAttribute 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
TagHelperAttribute(String) |
使用指定的 |
TagHelperAttribute(String, Object) |
使用指定的 |
TagHelperAttribute(String, Object, HtmlAttributeValueStyle) |
使用指定的 |
TagHelperAttribute(String)
使用指定的 name
具現化 的新 TagHelperAttribute 實例。
ValueStyle 設定為 Minimized ,並將 Value 設定為 null
。
public:
TagHelperAttribute(System::String ^ name);
public TagHelperAttribute (string name);
new Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute : string -> Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute
Public Sub New (name As String)
參數
適用於
TagHelperAttribute(String, Object)
使用指定的 name
和 value
具現化 的新實例 TagHelperAttribute 。
ValueStyle 設定為 DoubleQuotes。
public:
TagHelperAttribute(System::String ^ name, System::Object ^ value);
public TagHelperAttribute (string name, object value);
new Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute : string * obj -> Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute
Public Sub New (name As String, value As Object)
參數
適用於
TagHelperAttribute(String, Object, HtmlAttributeValueStyle)
使用指定的 name
、 value
和 valueStyle
具現化 的新實例 TagHelperAttribute 。
public:
TagHelperAttribute(System::String ^ name, System::Object ^ value, Microsoft::AspNetCore::Razor::TagHelpers::HtmlAttributeValueStyle valueStyle);
public TagHelperAttribute (string name, object value, Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle valueStyle);
new Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute : string * obj * Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle -> Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute
Public Sub New (name As String, value As Object, valueStyle As HtmlAttributeValueStyle)
參數
- valueStyle
- HtmlAttributeValueStyle
ValueStyle新實例的 。
備註
如果 為 valueStyle
Minimized , value
則會在轉譯這個實例時忽略。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應