Xml.DocumentContent 属性
定义
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 文档的字符串。A string that contains the XML document to display in the Xml control.
- 属性
注解
将 Xml 通过以下三种方式之一来指定要在控件中显示的 XML 文档。The XML document to display in the Xml control is specified in one of three ways. System.Xml.XmlDocument通过设置相应的属性,可以指定对象、xml 字符串或 xml 文件。You can specify a System.Xml.XmlDocument object, an XML string, or an XML file by setting the appropriate property. DocumentContent属性用于指定 xml 字符串 (表示要在控件中显示的 xml 文档) 。The DocumentContent property is used to specify an XML string (representing an XML document) to display in the control. DocumentContent属性通常不是以编程方式设置的,或者设置为控件的属性。The DocumentContent property is not typically programmatically set, or set as an attribute of the control. 相反,XML 字符串通常是通过在控件的开始和结束标记之间放置文本来以声明方式进行设置的 <asp:Xml> 。Instead, the XML string is usually set declaratively by placing text between the opening and closing <asp:Xml> tags of the control.
备注
尽管 DocumentContent 属性同时包含 get 和 set 访问器,但只有 set 访问器很有用。Although the DocumentContent property contains both get and set accessors, only the set accessor is useful. 如果使用 get 访问器, String.Empty 则返回。If you use the get accessor, String.Empty is returned.