WebBrowser.InvokeScript Method (String)
Executes a script function that is implemented by the currently loaded document.
Assembly: PresentationFramework (in PresentationFramework.dll)
should not be called before the document that implements it has finished loading. You can detect when a document has finished loading by handling the LoadCompleted event.
The following example shows how to call a script function in a document from a WPF application by using . In this example, the script function has no parameters.
The following is the HTML document that implements the script function that will be called from WPF.
The following shows the WPF implementation to call the script function in the HTML document.
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.