Fatima
Fatima

Reputation: 869

How can I force the browser to open my urls in an existing tab rather than a new one?

In a WinForms application, I have a form in which I have a couple of link labels. When the user clicks on any of the links I want to open a page in an EXISTING browser TAB that my own application has opened. (Of course except for the first time that it should open a new tab) My problem: Process.Start("My Url"); opens a new tab all the time. Is there any way that I can tell the browser to stop opening new tabs?

Thanks before.

Upvotes: 2

Views: 5016

Answers (2)

HW90
HW90

Reputation: 1983

If you are using the INternetexplorer you can work with ShellWindows Example and description: Launch a URL in a tab in an existing IE window from C#

Upvotes: 0

Damien_The_Unbeliever
Damien_The_Unbeliever

Reputation: 239724

That behaviour is defined on a per-browser basis, and is a user setting that you shouldn't attempt to meddle with. If you do require this level of control, have you considered hosting a browser control within your application instead?

Upvotes: 4

Related Questions