WebBrowser Control Intercept Open in New Window

  • Thread starter Thread starter AlHoward
  • Start date Start date
A

AlHoward

Guest
Good morning.

I have made progress in VB to navigate through a series of pages - login, etc. but I hit a dead end at the next-to-last page.

The link is a doPostPack. In an ordinary web browser, clicking opens the target page in a new tab. But the System.Windows.Forms.WebBrowser, element.InvokeMember("Click") opens up Internet Explorer!

And of course it bombs because my code no longer has control, and the target page expects cookies or whatever.

Is there a way to pipe/ redirect the New Tab or Window to a second WebBrowser control rather than invoking the browser in the OS?

I've seen code that uses SHDocVw browser, but I cannot get it to work. The postback does not produce a URL; I am thinking the page is generated on the host server and handed back.

This is one of the evil links.

javascript:__doPostBack('ctl00$MainContent$dg_ValueProtestInformation$ctl11$HearingLinkButton','')

Visual Studio 2013

Target Framework 4.5

I use VB but can use C# if needed.

I have been searching for a couple of days and have had no luck. Any help would be gratefully appreciated!

Continue reading...
 
Back
Top