Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 61659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:21:14+00:00 2026-05-10T18:21:14+00:00

When using the .NET WebBrowser control how do you open a link in a

  • 0

When using the .NET WebBrowser control how do you open a link in a new window using the the same session (ie.. do not start a new ASP.NET session on the server), or how do you capture the new window event to open the URL in the same WebBrowser control?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T18:21:14+00:00Added an answer on May 10, 2026 at 6:21 pm

    I just spent an hour looking for the answer, so I though I would post the results here. You can use the SHDocVwCtl.WebBrowser_V1 object to capture the NewWindow event.

    NOTE: Code from http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_21484555.html#discussion

    //-------------------------------VB.NET Version:-------------------------------  Dim WithEvents Web_V1 As SHDocVwCtl.WebBrowser_V1  Private Sub Form_Load()     Set Web_V1 = WebBrowser1.Object End Sub  Private Sub Web_V1_NewWindow(ByVal URL As String, ByVal Flags As Long, ByVal TargetFrameName As String, PostData As Variant, ByVal Headers As String, Processed As Boolean)     Processed = True     WebBrowser1.Navigate URL End Sub   //-------------------------------C# Version-------------------------------  private SHDocVw.WebBrowser_V1 Web_V1; //Interface to expose ActiveX methods  private void Form1_Load(object sender, EventArgs e) {     //Setup Web_V1 interface and register event handler     Web_V1 = (SHDocVw.WebBrowser_V1)this.webBrowser1.ActiveXInstance;     Web_V1.NewWindow += new SHDocVw.DWebBrowserEvents_NewWindowEventHandler(Web_V1_NewWindow); }  private void Web_V1_NewWindow(string URL, int Flags, string TargetFrameName, ref object PostData,string Headers, ref bool Processed) {     Processed = true; //Stop event from being processed      //Code to open in same window     this.webBrowser1.Navigate(URL);      //Code to open in new window instead of same window     //Form1 Popup = new Form1();     //Popup.webBrowser1.Navigate(URL);     //Popup.Show(); } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 130k
  • Answers 130k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The trick is to invoke withdraw on the Tk root… May 12, 2026 at 6:00 am
  • Editorial Team
    Editorial Team added an answer If you are talking about the Security ID button located… May 12, 2026 at 6:00 am
  • Editorial Team
    Editorial Team added an answer There is a great provider: http://www.clickatell.com/ Here's the coverage: http://www.clickatell.com/pricing/basic_coverage.php… May 12, 2026 at 6:00 am

Related Questions

I'm using .NET WebBrowser control. How do I know when a web page is
I'm trying to use a .Net WebBrowser control to log into a website and
When using .NET's WebBrowser control, how can I get the entire HTML of the
I have a web page that is being displaying in a winform app using

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.