WebBrowser.DocumentType Property

 

Gets the type of the document currently displayed in the WebBrowser control.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

[BrowsableAttribute(false)]
public string DocumentType { get; }

Property Value

Type: System.String

The type of the current document.

Exception Condition
ObjectDisposedException

This WebBrowser instance is no longer valid.

InvalidOperationException

A reference to an implementation of the IWebBrowser2 interface could not be retrieved from the underlying ActiveX WebBrowser control.

The value of this property corresponds to the Multipurpose Internet Mail Extensions (MIME) type of the document.

SecurityPermission

for immediate callers to use this control. Demand value: LinkDemand; NIB: Named Permission Sets: FullTrust.

.NET Framework
Available since 2.0
Return to top
Show: