How to Test and Debug an ASP.NET Application—How to test an application with a browser other than the default


Jump to: navigation, search
Visual C# Tutorials
ASP.NET Tutorials

How Test and Debug ASP.NET

© 2006 Mike Murach & Assoc.

How to test an application with a browser other than the default

Once you’ve thoroughly tested your application with Internet Explorer, you’ll want to test it with other browsers to make sure it works as expected. Figure 4-5 describes two ways to do that. First, you can right-click the starting page for the application in the Solution Explorer and choose the Browse With command. This displays a Browse With dialog box like the one shown in this figure. From this dialog box, you can choose the browser you want to use and then click the Browse button.

Notice that the list of browsers in the Browse With dialog box includes the Internal Web Browser. If you choose this browser, the page is displayed in a Browse window within Visual Studio. You can test the application from this browser just as you would from any other browser. Then, when you’re done with the browse operation, just close the Browse window.

You can also test an application with another browser by making that browser the default browser. To do that, right-click any page in the Solution Explorer and choose Browse With. Next, select the browser you want to designate as your default browser and click the Set As Default button. Then, click the Cancel button to close the Browse With dialog box. You can then use any of the techniques listed in figure 4-4 to start the application in the browser you selected. Note that setting a browser as the default is the only way to use the debugger with the browser. That’s because the Browse With command runs an application without debugging.

Sometimes, the browser you want to test an application with doesn’t appear in the Browse With dialog box even though it’s installed on your computer. In most cases, that’s because you installed the browser after installing Visual Studio. Then, you can add the browser by clicking the Add button in the Browse With dialog box to display the Add Program dialog box. This dialog box lets you locate the executable file for the browser you want to add and enter a “friendly” name that’s used for the browser in the Browse With dialog box.

Figure 4-5 How to test an application with a browser other than the default

The Browse With dialog box

Two ways to test an application with a browser other than the default

• Right-click the starting page for the application in the Solution Explorer and choose Browse With from the shortcut menu. In the Browse With dialog box that’s displayed, select the browser you want to use and click the Browse button.

• Select the browser you want to use in the Browse With dialog box and then click the Set as Default button to make that browser the default. The next time you run the application, it will be displayed in the browser you selected.

Description

• It’s important to test an ASP.NET application in any browsers that might be used to run the application.

• If a browser isn’t included in the list of available browsers, you can add it to the list by clicking the Add button in the Browse With dialog box and then using the Add Program dialog box that’s displayed to add the desired browser.

• If you select the Internal Web Browser option, the page is displayed in a Browse window within Visual Studio. To end the browse operation from this window, just close the window.

• You’ll need to change the default browser if you want to use the debugger with another browser, since the Browse With command starts the application without debugging.


Previous_Page_.gif Next_Page_.gif

Share this page
  • del.icio.us
  • Facebook
  • Google+
  • StumbleUpon