views:

34

answers:

2

I have a winform with 2 WebBrowser control. Is there a way for one page to communicate with the other directly?

For example in HTML and frames, one page can access window.parent.frames[1].document for example.

+4  A: 

Not directly, because those will be two separate browser instances. You can however write some communication layer of your own. Obviously you'll have to tailor the websites you are showing for this as well.

Vilx-
+2  A: 

Technically it is feasible like the web chat between two or more people in Gmail or Facebook.

This is not a simple task, but today there is the HTML5's websockets or if you target older browsers as well, you could poll the server on both frames and share some statuses that you read every few seconds.

In any case, this is a messaging(string) communication (eg: a stringified JSON) that you can pass.
But you will never be able to access the DOM of the other browser/frame.

Mic
I was hoping to avoid websocket or client/server communications.
Dan