title | titleSuffix | description | ms.date | ms.subservice | ms.topic | f1_keywords | helpviewer_keywords | author | ms.author | manager | ||
---|---|---|---|---|---|---|---|---|---|---|---|---|
SupportsCodeSeparation Element (Visual Studio Templates) |
Learn about the SupportsCodeSeparation element and how it specifies if the Place code in separate file check box is enabled in the Add New Item dialog box. |
11/04/2016 |
general-ide |
reference |
|
maiak |
maiak |
mijacobs |
Specifies whether or not the Place code in separate file check box is enabled in the Add New Item dialog box.
<VSTemplate> <TemplateData> <SupportsCodeSeparation>
<SupportsCodeSeparation> true/false </SupportsCodeSeparation>
The following sections describe attribute, child elements, and parent elements.
None.
None.
Element | Description |
---|---|
TemplateData | Required element. Categorizes the template and defines how it displays in either the New Project or the New Item dialog box. |
A text value is required.
The text must be either true
or false
, indicating whether or not the Place code in separate file check box is enabled in the Add New Item dialog box.
SupportsCodeSeparation
is an optional element. The default value is false
.
The SupportsCodeSeparation
element is only available for Web item templates.
Code separation, or the code-behind page model, allows you to keep the markup in one file and the programming code in another file. ASP.NET and other .NET languages use this model.
The following example specifies to display the Place code in separate file option.
<VSTemplate Version="3.0.0" Type="Project"
xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">>
<TemplateData>
<Name>MyWebProjecStarterKit</Name>
<Description>A simple Web template</Description>
<Icon>icon.ico</Icon>
<ProjectType>Web</ProjectType>
<ProjectSubType>CSharp</ProjectSubType>
<DefaultName>WebSite</DefaultName>
<SupportsCodeSeparation>true</SupportsCodeSeparation>
</TemplateData>
<TemplateContent>
<Project File="WebApplication.webproj">
<ProjectItem>icon.ico</ProjectItem>
<ProjectItem OpenInEditor="true">Default.aspx</ProjectItem>
<ProjectItem>Default.aspx.cs</ProjectItem>
</Project>
</TemplateContent>
</VSTemplate>