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 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.