Share via


Web Application Project Templates

Visual Studio web application project and item templates provide reusable and customizable web application project and item stubs that accelerate the development process, removing the need to create new web application projects and items from scratch. For more information on Visual Studio templates, see Introduction to Visual Studio Templates.

For an implementation of web application project and item templates, see the IronPython Web Application Project System Sample.

Project Template Folder

Project Templates are installed in the common ProjectTemplates folder. Typically, they are put in a Web subfolder under the folder which is named after the language. For example, the Visual C# web application template is typically installed to:

  • <VS>\Common7\IDE\ProjectTemplates\CSharp\Web\WebApplication.zip

IronPython templates do not have a Web subfolder. The IronPython web application template is typically installed to:

  • <VS>\Common7\IDE\ProjectTemplates\IronPython\WebApplication.zip

Project Templates

Project templates are used to build new web applications in response to the New Project/Web Site menu command. Two web application projects are currently supported:

  • Web Site Projects

  • Web Service Application Projects

Web Application Projects

These file create a new web application in response to the New Project/ASP.NET Web Application menu command.

  • __TemplateIcon.ico

    The icon associated with the template.

  • Default.aspx

    The default home page for the new web site. The Language attribute specifies the codebehind language, and the CodeBehind attribute specifies the dependent file containing the codebehind code associated with this page.

  • Default.aspx.<extension>

    The dependent file that contains the codebehind code for the default home page. The <extension> of this file determines the codebehind language.

  • web.config

    The root web.application configuration file.

  • WebApplication.vstemplate

    The template file that determines the content of the web application solution.

  • WebApplication.<projextension>

    The project file template. <projextension> is the project extension registered for this project type.

Web Service Application Projects

These file create a new web application in response to the New Web Site/ASP.NET Web Service Application menu command.

  • __TemplateIcon.ico

    The icon associated with the template.

  • Service1.asmx

    The HTML page for the new web service. The Language attribute specifies the codebehind language, and the CodeBehind attribute specifies the dependent file containing the codebehind code associated with this service.

  • Service1.<extension>

    The dependent file that implements the service class. The <extension> of this file selects the codebehind language.

  • web.config

  • The root web.application configuration file.

  • WebService.vstemplate

    The template file that determines the content of the web application solution.

  • WebService.<projextension>

    The project file template. <projextension> is the project extension registered for this project type.

Project Item Templates

Project item templates are used to add new web pages to a web application in response to the Add Existing Item menu command. These web pages are currently supported:

  • New Browser file

  • New Content Page

  • New HTTP Handler

  • New Jscript file

  • New Master Page

  • New SiteMap file

  • New Skin file

  • New Stylesheet

  • New Web class

  • New Web.config file

  • New Web form

  • New HTML page

  • New Web service

  • New Web user control

The <ProjectType> tag of the associated vstemplate file determines the project system.

New Browser File

This template creates a new browser file that controls page rendering in response to Add New Item/Browser File.

  • BrowserFile.browser

    The browser file template.

  • BrowserFile.vstemplate

    The vstemplate file that creates the browser file and determines its contents.

New Content Page

This template creates a new content page in response to Add New Item/Web Content Form.

  • ContentPage.aspx

    The web content page template. The Language attribute specifies the codebehind language, and the CodeBehind attribute specifies the dependent file containing the codebehind code associated with this service.

  • ContentPage.aspx.<extension>

    The dependent file that contains the codebehind code for the content page. The <extension> of this file determines the codebehind language.

  • ContentPage.vstemplate

    The vstemplate file that creates the content page and determines its contents.

New HTTP Handler

This template creates a new HTTP handler in response to Add New Item/Generic Handler.

  • Handler.ashx

    The HTTP handler web page. The Language attribute specifies the codebehind language, and the CodeBehind attribute specifies the dependent file containing the codebehind code associated with this service.

  • Handler.ashx.<extension>

    The dependent file that contains the codebehind code for the handler page. The <extension> of this file determines the codebehind language.

  • Handler.vstemplate

    The vstemplate file that creates the handler page and determines its contents.

New JScript File

This template creates a new empty JScript script file in response to Add New Item/JScript File.

  • Jscript.js

    The JScript file template.

  • JScript.vstemplate

    The vstemplate file that creates the JScript file and determines its contents.

New Master Page

This template creates a new master page in response to Add New Item/Master Page.

  • Site.Master

    The master page template. The Language attribute specifies the codebehind language, and the CodeBehind attribute specifies the dependent file containing the codebehind code associated with this service.

  • Site.Master.<extension>

    The dependent file that contains the codebehind code for the master page. The <extension> of this file determines the codebehind language.

  • MasterPage.vstemplate

    The vstemplate file that creates the master page and determines its contents.

New Site File

This template creates a new site navigation file in response to Add New Item/Site Map.

  • Web.sitemap

    The site navigation file template.

  • SiteMap.vstemplate

    The vstemplate file that creates the site map file and determines its contents.

New Skin File

This template creates a new skin file in response to Add New Item/Skin File.

  • SkinFile.skin

    The skin file template.

  • SkinFile.vstemplate

    The vstemplate file that creates the skin file and determines its contents.

New Style Sheet

This template creates a new CSS style sheet in response to Add New Item/Style Sheet.

  • StyleSheet.css

    The style sheet template.

  • StyleSheet.vstemplate

    The vstemplate file that creates the style sheet and determines its contents.

New Web Class

This template creates a new source file that defines an empty class in response to the Add New Class menu command.

  • __TemplateIcon.ico

    The icon associated with the template.

  • Class.<extension>

    The source file that implements the empty class. The <extension> of this file selects the codebeside language.

  • WebClass.vstemplate

    The vstemplate file that creates the source file and determines its contents.

New Web.config File

This template creates a new CSS style sheet in response to Add New Item/Web Configuration File.

  • Web.Config

    The web.config file template.

  • WebConfig.vstemplate

    The vstemplate file that creates the style sheet and determines its contents.

New Web Form

This template creates a new smart web page in response to the Add New Item/Web Form menu command.

  • Default.aspx

    The default home page for the new web site. The Language attribute specifies the codebehind language, and the CodeBehind attribute specifies the dependent file containing the codebehind code associated with this page.

  • Default.aspx.<extension>

    The dependent file that contains the codebehind code for the default home page. The <extension> of this file determines the codebehind language.

  • WebForm.vstemplate

    The vstemplate file that determines the contents of the new web page and its dependent file, if any.

New HTML Page

This template creates a new web page in response to the Add New Item/HTML Page menu command.

  • HTMLPage.htm

    The starting content of the web page. This web page typically has no associated codebehind dependent file. To create a smart page with an associated codebehind file, use the WebForm template instead.

  • WebHTMLPage.vstemplate

    The vstemplate file that creates the web page and determines its contents.

New Web Service

This template creates a new web service page in response to the Add New Item/Web Service menu command.

  • WebService.asmx

    The web service page template. The Language attribute specifies the codebehind language, and the CodeBehind attribute specifies the dependent file containing the codebehind code associated with this page.

  • WebService.asmx.<extension>

    The dependent file that contains the codebehind code for the web service page. The <extension> of this file determines the codebehind language.

  • WebService.vstemplate

    The vstemplate file that determines the contents of the new web service page and its dependent file, if any.

New Web User Control

This template creates a new web user control page in response to the Add New Item/Web User Control menu command.

  • WebUserControl.ascx

    The web user control page template. The Language attribute specifies the codebehind language, and the CodeBehind attribute specifies the dependent file containing the codebehind code associated with this page.

  • WebUserControl.ascx.<extension>

    The dependent file that contains the codebehind code for the web service page. The <extension> of this file determines the codebehind language.

  • WebUserControl.vstemplate

    The vstemplate file that determines the contents of the new web user control page and its dependent file, if any.

See Also

Other Resources

Web Application Projects