System.Windows.Forms.WebBrowser.Url Property

Gets or sets the URL of the current document.

Syntax

[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.WebBrowserUriTypeConverter))]
[System.ComponentModel.DefaultValue(null)]
[System.ComponentModel.Bindable(true)]
public Uri Url { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Setting this property is equivalent to calling the erload:System.Windows.Forms.WebBrowser.Navigate method and passing it the specified URL.

The System.Windows.Forms.WebBrowser control maintains a history list of all the Web pages visited during a browsing session. When you set the WebBrowser.Url property, the System.Windows.Forms.WebBrowser control navigates to the specified URL and adds it to the end of the history list.

The System.Windows.Forms.WebBrowser control stores Web pages from recently visited sites in a cache on the local hard disk. Each page can specify an expiration date indicating how long it will remain in the cache. When the control navigates to a page, it saves time by displaying a cached version, if one is available, rather than downloading the page again. Use the erload:System.Windows.Forms.WebBrowser.Refresh method to force the System.Windows.Forms.WebBrowser control to reload the current page by downloading it, ensuring that the control displays the latest version.

Note:

This property contains the URL of the current document, even if another document has been requested. If you set the value of this property and then immediately retrieve it again, the value retrieved may be different than the value set if the System.Windows.Forms.WebBrowser control has not had time to load the new document. You can retrieve the new value in a WebBrowser.DocumentCompleted event handler.

Requirements

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