Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Run Web Application in Multiple Browsers (Visual Studio)

0.00/5 (No votes)
8 Feb 2014 1  
Run Web Application in Multiple Browsers (Visual Studio)

Introduction

As a web developer, for performing cross browser testing, we need to run our web site in multiple browsers from Visual Studio. Generally, in a common way, we select a particular browser from the browser selection menu and run the application. However, you can set multiple browsers as your default browser.

Using the Code

When you run the application without debugging (Ctrl+ F5), Visual Studio will run the application in all the browsers, in case of debugging (F5), Visual Studio will prompt you to select a particular browser from the selected default browser list.

In the browser list drop-down, by default, you will be able to see the list of all added browsers, with default browser as checked.

When you select the “Browse With…” option, the following dialog will appear, and you can see the entire list of browsers along with the browser which is marked as “(Default)”.

Now, there can be more than one default browser, and the same has been written in the dialog control as well – “Browsers (Select one or more):”. So, select all the browsers in which you want to run the application together, and click on “Set as Default”. That’s all. Now if you click on “Browse” button in the same dialog control, you will find your web application starts on all the selected browsers at the same time.

If you go back to the Visual Studio main menu, a new option “Multiple Browser” will appear.

Now, if you want to debug the application, and press “F5” or select the multiple browsers options, the following dialog will appear, and you need to select a specific browser from the list of selected browsers.

If you run the application without debugging mode and wanted to run the application to verify the cross browser compatibility, Visual Studio will invoke all the browsers for the same application.

Points of Interest

This feature is really useful for web developers who spend time on cross browser testing! And of course – all the web developers spend time for the same! So, from next time, apply this feature. ;)

Note: This is not a new feature with Visual Studio 2013, it was available in previous versions as well.

History

  • 8th February, 2014: Initial version

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here