Xml.DocumentContent 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
會設定一個包含 XML 文件的字串,在控制項中 Xml 顯示。
public:
property System::String ^ DocumentContent { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Browsable(false)]
public string DocumentContent { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.DocumentContent : string with get, set
Public Property DocumentContent As String
屬性值
一個包含 XML 文件的字串,該文件要在控制項中 Xml 顯示。
- 屬性
備註
控制項中要顯示 Xml 的 XML 文件有三種方式之一。 你可以透過設定適當的屬性來指定 System.Xml.XmlDocument 物件、XML 字串或 XML 檔案。 此 DocumentContent 屬性用於指定一個 XML 字串(代表 XML 文件)以顯示於控制項中。 該 DocumentContent 屬性通常不會被程式化設定,也不會被設定為控制項的屬性。 相反地,XML 字串通常是透過在控制項的開頭與關閉 <asp:Xml> 標籤之間放置文字,以宣告式方式設定。
備註
雖然該 DocumentContent 性質同時包含 get 和 , set 但只有 set accessor 是有用的。 如果你使用 get 了該附件,它 String.Empty 會被退回。