Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / .NET

Launching ASP.NET web applications on multiple browsers at the same time from Visual Studio(2012)

5.00/5 (1 vote)
12 May 2013CC (ASA 3U)2 min read 18.8K  
This post explains how to launch your ASP.NET web application on multiple browsers at the same time from Visual Studio, and how this feature is enhanced in Visual Studio 2012

Introduction

Visual Studio 2010 offered option to view a particular .aspx page on multiple browsers when you right-click the file and chose Browse With… but it didn’t provide storing the setting and allowing to launch the web page on multiple browsers at the same time when you execute every time.

In this article we will see how this feature is enhanced in Visual Studio 2012; you can set multiple browsers as default and store this setting permanently and when you Debug(F5) you will get a dialog to choose the browser you’d like to debug with or when you Execute without debugging (Ctrl+F5) you will be able to launch the web application in multiple browsers.  

Launching ASP.NET web applications on multiple browsers at the same time from Visual Studio(2012) 

As you may have noted from my earlier article about Visual Studio 2012 new features, Visual Studio 2012 has a browser drop down that lets you select the browser that will be used to launch your ASP.NET web application when you debug it (F5) as shown below, as I mentioned in my article, this was achievable in earlier Visual Studio versions via other not-so-quick menu/context menu commands.

Visual-Studio-2012-Browser-Drop-Down

 

If you click the Browse With… menu option shown above, you will be presented with the below dialog.

Visual-Studio-2012-Browse-With-Dialog

This window shows all the names of the browsers installed in your machine. As indicated by the dialog, you can select more than one browser and click Browse to launch the web application in the chosen browsers, this will not launch your web application in Debug mode.

Also, you can select multiple browsers and click Set as Default to make this setting permanent, so that whenever you execute the web application without debugging(Ctrl+F5) it will be launched in these browsers at the same time. The Execute command in Visual Studio 2012 will be captioned as Multiple Browsers instead of the default browser name.

Visual-Studio-2012-MultipleBrowsers-ExecuteButton

 

If you click the Execute command(which will execute your web application in debug mode) you will get the below prompt.

Visual-Studio-2012-DebugMode-ChooseBrowser

You can choose which browser you wish to use for debugging.

I think this particular feature will be a productivity enhancer for web developers who work on achieving browser compatibility and tackle issues arising when providing multiple browser support for their ASP.NET Web Applications. 

License

This article, along with any associated source code and files, is licensed under The Creative Commons Attribution-Share Alike 3.0 Unported License