System.Windows.Forms.WebBrowser.Refresh Method

Reloads the document currently displayed in the System.Windows.Forms.WebBrowser control by checking the server for an updated version.

Syntax

public override void Refresh ()

Remarks

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. The WebBrowser.Refresh method forces the System.Windows.Forms.WebBrowser control to reload the current page by downloading it, ensuring that the control displays the latest version. You can use this method to implement a Refresh button similar to the one in Internet Explorer.

Note:

A document refresh simply reloads the current page, so the WebBrowser.Navigating, WebBrowser.Navigated, and WebBrowser.DocumentCompleted events do not occur when you call the WebBrowser.Refresh method.

Requirements

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