Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Compiling and Running Web Forms Pages

Visual Studio .NET 2003

When you are ready to build and run your Web Forms page, you must first compile the ASP.NET Web application project. Once the Web application is compiled, the pages included within it can be run. There are three methods you can utilize to build the application and run your Web Forms page.

MethodDescription
With the debugger Starts the default browser and loads the specified start page. Running a page in the debugger allows you to step through code line by line and make use of additional analysis tools and run-time information. If Visual Studio detects that key files have changed, it will also build the project before launching the browser with the specified start page.
Note   In order to run a project with the debugger, you must be a member of the Debugger Users group on the server computer, and the computer must be configured to support debugging. For details, see Introduction to Web Application Debugging.
Without the debugger Allows you to run your code as it normally would run outside of the context of development tools, and therefore no run-time information is available through these tools. If Visual Studio detects that key files have changed, it will build the project before launching the browser with the specified start page.
View in BrowserCompiles the project and opens a Web page chosen from Solution Explorer. The project is compiled and run in the default browser within Visual Studio.
Note   When your Web application runs, it executes within the context of a special local user, called ASPNET, that determines the permissions that your application will have to access resources. For details, see Access Permissions for Web Applications.

To build and run a Web Forms page with the debugger

  1. In Solution Explorer, right-click your Web Forms page and click Set As Start Page.
  2. On the Debug menu, click Start. This command instructs Visual Studio to run the ASP.NET Web application in the debugger.
  3. To stop running the form and return to design mode, close the browser, or on the Debug menu click Stop Debugging.
    Tip   F5 is the keyboard shortcut for Start, and SHIFT+F5 is the keyboard shortcut for Stop Debugging.

To build and run a Web Forms page without the debugger

  1. In Solution Explorer, right-click your Web Forms page and click Set As Start Page.
  2. On the Debug menu, click Start without Debugging. Visual Studio saves all files in the project and then builds it. The project's start page is launched in the default browser.
    Tip   CTRL+F5 is the keyboard shortcut for Start without Debugging.
  3. To stop running the form and return to design mode, close the browser, or click Stop Debugging on the Debug menu.

To build and run a Web Forms page using the View in Browser feature

  1. In Solution Explorer, right-click the Web Forms page you want to preview, and click View in Browser.
  2. Visual Studio builds the ASP.NET Web application and launches the specified start page within the default browser. The page is labeled Preview in the Visual Studio environment.
  3. To stop running the preview, close the preview page.

See Also

Compilation and Deployment of Web Projects | Introduction to Web Application Debugging

Show:
© 2015 Microsoft