編集

次の方法で共有


HtmlElement.OuterText Property

Definition

Gets or sets the current element's text.

public:
 property System::String ^ OuterText { System::String ^ get(); void set(System::String ^ value); };
public string OuterText { get; set; }
member this.OuterText : string with get, set
Public Property OuterText As String

Property Value

The text inside the current element, and in the element's children.

Exceptions

You cannot set text outside of this element.

Remarks

If you attempt to assign HTML to an element with OuterText, the HTML code will display as literals in the document, just as if you were viewing HTML within a text file. If you assign HTML to an element using the InnerHtml property, OuterText will return all of the text in that HTML with the markup removed.

Assigning a value to OuterText will destroy any child elements that belong to the element.

Applies to

See also