Gets or sets the HTML markup underneath this element.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Creating child elements on this element is not allowed.
There are several ways to add new elements to an existing HTML page, such as the AppendChild and InsertAdjacentElement methods. Using is often the fastest way to add new content when you have to set many attributes or styles on your new elements.
Settingdestroys any children previously appended to the element. If you retrieve an element from the DOM and then assign new HTML to its parents' property, your reference to that element will be useless, and its behavior when it calls its properties and methods is undefined.
For some elements, setting IMG tag, and therefore cannot contain nested elements. Some tags, such as the SCRIPT tag, can only contain text content; setting will result in an error. For both types of tags, the CanHaveChildren property will return false. However, you also cannot set on TABLE and TR elements, as assigning malformed HTML to these elements could corrupt the rendering of the document. Use AppendChild or the insertRow and insertCell methods on the unmanaged IHTMLTable interface to add rows and cells to a TABLE.is not a valid operation. Some HTML tags have no closing tag, such as the
If you need only to assign text to an element and not HTML markup, use the InnerText property instead.
Assigning a value to InnerText.will destroy any text values previously assigned using
Available since 2.0