Reputation: 1411
i have a Windows Forms application, which uses a Webbrowsercontrol to display a dynamically generated Htmlpage. Is there a possibility to interact with the jscode of the page? For example if i have have the following function:
<script type="text/javascript">
function ReturnValue()
{
var output;
output ='test';
return output;
}
</script>
Would there be a possibility to receive "test" in my application (not trough url)?
Upvotes: 1
Views: 4689
Reputation: 919
Yes it's possible using InvokeScript on the browser control; see this article for more information: http://www.codeproject.com/Tips/127356/Calling-JavaScript-function-from-WinForms-and-vice
Upvotes: 2