IncludeHiddenColumns element (SPMetal)

Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013

Specifies that hidden columns are included in code generation.

<IncludeHiddenColumns />

Elements and attributes

The following sections describe attributes, child elements, and parent elements.

Attributes

None.

Child elements

None.

Parent elements

Element Description
ContentType
Specifies that a content type should be included in code generation, and modifies which columns in the content type are included in code generation.

Remarks

A ContentType element cannot have both an ExcludeOtherColumns element and an IncludeHiddenColumns element.

Example

The following shows the IncludeHiddenColumns element in use. The presence of the element ensures that the code that is generated for the Contact content type class will have properties for the content type's hidden columns.

<?xml version="1.0" encoding="utf-8"?>
<Web AccessModifier="Internal" xmlns="http://schemas.microsoft.com/SharePoint/2009/spmetal">
  <ContentType Name="Contact" Class="Contact">
    <Column Name="ContId" Member="ContactId" />
    <Column Name="ContactName" Member="ContactName1" />
    <Column Name="Category" Member="Cat" Type="String"/>
    <IncludeHiddenColumns />
  </ContentType>
  <ExcludeContentType Name="Order"/>
  <List Name="Team Members" Type="TeamMember">
    <ContentType Name="Item" Class="TeamMember" />
  </List>
</Web>

See also