WebBrowser.Source Property
Gets or sets the Uri of the current document hosted in the WebBrowser.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
| Exception | Condition |
|---|---|
| ObjectDisposedException |
The WebBrowser instance is no longer valid. |
| InvalidOperationException |
A reference to the underlying native WebBrowser could not be retrieved. |
| SecurityException |
Navigation from an application that is running in partial trust to a Uri that is not located at the site of origin. |
Setting the source property causes WebBrowser to navigate to the document specified by the Uri. If the Uri is null, a blank document is displayed ("about:blank").
The following example shows how to configure WebBrowser to navigate to an HTML document by using markup only.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.