开发者

How to send string messages from a visual c# form application to a webpage

I have a c# windows form application with a webkit.net embedded. Now I was wondering if I can somehow send a string message to the webpage that the application opened.

My application is basically a simple browser, I'm hoping to have a button that sends text to the opened webpage to start some JavaScript (just like how cross domain postMessage works). The ta开发者_高级运维rget page already has the needed eventlistener.

Thanks in advance.


you can use Watin to drive web browser user gestures, such as typing, clicking, etc. http://watin.org/


I took a look at the WebKit.NET sources and this should be straightforward. Your WebKitBrowser user control has a property called Document - it has a method called InvokeScriptMethod(). It should be as simple as calling it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜