Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Webbrowser Control - Copy contents of one control to the other

Posted on 2004-10-28
Medium Priority
Last Modified: 2010-04-24

I've got a windows form with two webbrowser controls; wb1 and wb2
I navigate to "webform1.htm" in wb1  


I programmatically fill out some details in webform1 and now comes the tricky part. I want to either...

Post webform1 and get the result to appear directly in the browsercontrol wb2


Post webform1 and then copy the result from webform1 to webform2

Can anyone help? Thanks in advance!
Question by:siono7
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
LVL 18

Expert Comment

ID: 12431582
see the following link for posting data
LVL 18

Expert Comment

ID: 12431587
and instead of using axWebBrowser1 of Form1, use the object of form2 to get the results in that

Author Comment

ID: 12433342
Thanks for your answer armoghan, it seems to be the right solution but when I post the form to the second browser control with all the post data and the header information, I get an error saying that I have to enable cookies. Have you any idea why this is?
LVL 18

Accepted Solution

armoghan earned 1200 total points
ID: 12440994
Ok actually WebBrowser control handles cookies at the backend.. so what you need to do is get cookies and send it to the navigate method of the other control

see this link for sending the cookies by adding it to header. Cookies are just name value pair

string sCookies = "MyCookie=MyCookieValue";

   object o         = null;
   object oHeader    = "Cookie: " + sCookies + "\r\nMyItem: YES\r\n";

   browser.Navigate(sURL, ref o, ref o, ref o, ref m_oHeader);

LVL 18

Expert Comment

ID: 12733210
Accept armoghan

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

596 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question