ASP.NET and programmatic opening different browsers

50   50
Oct 27, 2010
I have a quick question:
When clicking on a button in ASP.NET, is it possible to open a different Browser?

Suppose I have page with two buttons: A and B.

When clicking A -------------------> open page in new Internet Explorer instance.
When clicking B -------------------> open page in new FireFox (or any other browser) instance.


1,128   99.9
Oct 31, 2010
The OS has a setting for the default web browser on your system. This setting determines
which browser will open when you click on a link.

That being said, if you want to open Urls in different browsers, you will need to know the
path to the specific browser and open it using Process.Start or similar. Though I wouldn't
recommend it if it is for any other use than your own.


275   99.7
Nov 02, 2010

This is a nice idea to open two different browsers using two different buttons.

But each operating system has a setting of default web browser for each user profile. So this type of implementation is not recommended.

.Net provides System.Diagnostics namespace, which has a Process class. This process class provides a method called Start(). Using this Start() method you can run any process. If you want to implement the same feature in Windows Forms application then it is quite possible. But in case of web applications this will not support. Because if you will try to use System.Diagnostics namespace and code using its classes in web application, the code will be executed at server side not at the client side. so it is not possible to implement the same in web application.

Also one option may be to use javascript. But using javascript also it is not possible to identify whether a particular web browser is installed on the client machine or not.