HtmlDocument::Write Method (String^)
.NET Framework (current version)
Writes a new HTML page.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Parameters
- text
-
Type:
System::String^
The HTML text to write into the document.
All calls to Write should be preceded by a call to OpenNew, which will clear the current document and all of its variables. Your calls to Write will create a new HTML document in its place. To change only a specific portion of the document, obtain the appropriate HtmlElement and set its InnerHtml property.
It is recommended that you write an entire valid HTML document using the Write method, including HTML and BODY tags. However, if you write just HTML elements, the Document Object Model (DOM) will supply these elements for you.
The following code example opens a new HtmlDocument and writes in a new HTML file.
.NET Framework
Available since 2.0
Available since 2.0
Show: