Export (0) Print
Expand All

HtmlDocument.All Property

Gets an instance of HtmlElementCollection, which stores all HtmlElement objects for the document.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public HtmlElementCollection All { get; }
/** @property */
public HtmlElementCollection get_All ()

public function get All () : HtmlElementCollection

Not applicable.

Property Value

The HtmlElementCollection of all elements in the document.

The All collection provides random access to any element in the HTML document, regardless of its position in the document tree. Use it to access any element in an HTML document by name, ID, or index. You may also iterate over all of the elements within a document.

Some elements, such as HEAD and TITLE, will never have names associated with them. All other elements will have names only if the author of the HTML file assigned them. You can access elements without names by ID or index.

You cannot add elements directly to the All collection, because all elements in an HTML file outside of the HTML tag must have a parent element. Use the AppendChild method or the InnerHtml property on HtmlElement to add new elements to the tree.

The following code example iterates through all of the elements in a document and sets Enabled=True, enabling any elements that may have been disabled by default to prevent user input while the document was loading. The code example requires that your application contains a WebBrowser control named WebBrowser1.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft