Visual Studio Templates for Web Projects

Visual Studio includes project templates to help you get started when you create a new Web project. You can create Web application projects or Web site projects. By considering the most appropriate project type before you begin, you can save time when you create, test, and deploy the Web project.

Web Project Templates

From the File menu, you can select either New Project or New Web Site. The New Project dialog box provides a list of Web application templates. Use the Web application project template to create Web applications that are compiled into an assembly and that provide rich options for deployment.

The New Web Site dialog box provides a list of Web site templates. Use the Web Site project template when you want the source code to be compiled dynamically. For more information about the differences between Web project types, see Web Application Projects versus Web Site Projects.

Web Application Templates

Web application templates help you create a Web project that is compiled into an assembly for deployment. The following table lists templates that appear in the New Project dialog box under the Web category after you select a language (Visual Basic or Visual C#).

Project Template

More Information

ASP.NET Web Application

Use this project template to create a Web application that includes the following functionality:

  • A master page.

  • A cascading style sheet.

  • Login security using the ASP.NET membership system.

  • Ajax scripting using jQuery.

  • Navigation using a menu control.

    NoteNote
    You can choose not to use any of these features if they are not required for your application.

By default, the ASP.NET Web Application project template includes the following:

  • Folders to contain membership pages, client script files, and cascading style sheet files.

  • A data folder (App_Data), which is granted permissions that allow ASP.NET to read and write to it at run time.

  • A master page (.master file).

  • Web pages named Default.aspx and About.aspx. In the project template, these are content pages for the default master page.

  • A global application class (Global.asax file).

  • A Web.config file.

  • For more information, see ASP.NET Web Application Projects and Web Application Projects versus Web Site Projects.

ASP.NET MVC 2 Web Application

Use this project template to create Web applications that use a model-view-controller pattern, using the ASP.NET MVC 2 release. The MVC pattern helps you separate the different aspects of the application (input logic, business logic, and UI logic), while providing a loose coupling between these elements. In addition, this project template promotes test-driven development (TDD).

For more information, see ASP.NET MVC Overview.

ASP.NET Empty Web Application

This template creates an ASP.NET Web application that includes a Web.config file, but no other files. Use this project template when you do not require the functionality built into the standard template (for example, master pages, CSS, and optional membership), and you are not creating a Dynamic Data application or an MVC application.

ASP.NET MVC 2 Empty Web Application

This template creates an empty ASP.NET MVC 2 Web application that includes folders for controllers, models, views, and scripts, a Web.config file at the root, a Web.config file in the Views folder, a Site.css file, a Global.asax file, and script files.

ASP.NET Dynamic Data Entities Web Application

Use this project template to create a Dynamic Data Web application that uses the ADO.NET Entity Framework. This type of Dynamic Data Web application can target any relational database.

Dynamic Data automatically generates a functional Web application for viewing and editing data, based on the schema of the data. For more information, see ASP.NET Dynamic Data Content Map.

ASP.NET Dynamic Data Linq to SQL Web Application

Use this project template to create a Dynamic Data Web application that uses LINQ to SQL to access SQL databases. This Web application can target any relational database.

For more information about Dynamic Data, see ASP.NET Dynamic Data Content Map.

ASP.NET AJAX Server Control

Use this project template to create a Web server control for ASP.NET Web Forms pages that incorporates Ajax functionality. The control consists of server and client code that work together to produce rich client behavior.

For more information, see Microsoft Ajax Overview.

ASP.NET AJAX Server Control Extender

Use this project template to create an Ajax component that enhances the client capabilities of standard ASP.NET Web server controls.

For more information, see Microsoft Ajax Extender Controls Overview.

ASP.NET Server Control

Use this project template to create a custom ASP.NET Web server control that can be used in ASP.NET Web Forms pages.

For more information, see Developing Custom ASP.NET Server Controls.

Web Site Templates

Web site templates help you create a Web project that by default is compiled dynamically. The following table lists templates that appear in the New Web Site dialog box.

Project Template

More Information

ASP.NET Web Site

Use this project template to create a Web site that includes the following functionality:

  • A master page.

  • A cascading style sheet.

  • Login security using the ASP.NET membership system.

  • Ajax scripting using jQuery.

  • Navigation using a menu control.

    NoteNote
    You can choose not to use any of these features if they are not required for your application.

By default, the ASP.NET Web Site project template includes the following:

  • Folders to contain membership pages, client script files, and cascading style sheet files.

  • A data folder (App_Data), which is granted permissions that allow ASP.NET to read and write to it at run time.

  • A master page (.master file).

  • Web pages named Default.aspx and About.aspx. In the project template, these are content pages for the default master page.

  • A global application class (Global.asax file).

  • A Web.config file.

For more information, see Walkthrough: Creating a Basic Web Page in Visual Studio.

ASP.NET Empty Web Site

This template creates an ASP.NET Web site that includes a Web.config file but no other files. Use this project template when you do not require the functionality built into the standard template (for example, master pages, CSS, and optional membership), and you are not creating a Dynamic Data Web site.

ASP.NET Dynamic Data Entities Web Site

Use this project template to create a Dynamic Data Web site that uses the ADO.NET Entity Framework. This type of Dynamic Data Web application can target any relational database.

Dynamic Data automatically generates a functional Web application for viewing and editing data, based on the schema of the data. For more information, see ASP.NET Dynamic Data Content Map.

ASP.NET Dynamic Data Linq to SQL Web Site

Use this project template to create a Dynamic Data Web site that uses LINQ to SQL to access SQL databases. This Web site can target any relational database.

For more information about Dynamic Data, see ASP.NET Dynamic Data Content Map.

WCF Service

Use this project template to create a Windows Communication Foundation (WCF) service that can be extended and called by a Web site, Web application, Silverlight application, Ajax application, or other client.

For more information, see Windows Communication Foundation.

ASP.NET Reports Web Site

Use this project template to create an ASP.NET Web site that contains a report (.rdlc file), a default ASP.NET page (.aspx file) that contains a ReportViewer control, and a Web.config file. For more information, see Microsoft Reports.

ASP.NET Crystal Reports Web Site

Use this project template to create an ASP.NET Web site that supports Crystal Reports. For more information, see Crystal Reports.

See Also

Concepts

Visual Web Developer Content Map