XhtmlTextWriter.AddRecognizedAttribute(String, String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將屬性加入至 XHTML 項目。 XhtmlTextWriter 物件的項目特定屬性集合是由 ElementSpecificAttributes 屬性所參考。
public:
virtual void AddRecognizedAttribute(System::String ^ elementName, System::String ^ attributeName);
public virtual void AddRecognizedAttribute (string elementName, string attributeName);
abstract member AddRecognizedAttribute : string * string -> unit
override this.AddRecognizedAttribute : string * string -> unit
Public Overridable Sub AddRecognizedAttribute (elementName As String, attributeName As String)
參數
- elementName
- String
要在其中加入屬性的 XHTML 項目。
- attributeName
- String
要加入的屬性。
備註
AddRecognizedAttribute使用 方法將屬性新增至 XHTML 專案。 然後,物件可以辨識和轉譯 XhtmlTextWriter 加入的屬性。 若要防止寫入器轉譯 XHTML 專案的通用屬性,請使用 RemoveRecognizedAttribute 方法。
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將推出:在 2024 年,我們將隨著內容的意見反應機制逐步淘汰 GitHub 問題,並以新的意見反應系統來取代。 如需詳細資訊,請參閱提交並檢視相關的意見反應