IncludeHiddenColumns (SPMetal)

Last modified: July 15, 2011

Applies to: SharePoint Foundation 2013 | SharePoint Server 2013

Specifies that hidden columns are included in code generation.

Web (SPMetal)
  ContentType (SPMetal)
    IncludeHiddenColumns (SPMetal)
<IncludeHiddenColumns />

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



Child elements


Parent elements



ContentType (SPMetal)

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

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

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="">
  <ContentType Name="Contact" Class="Contact">
    <Column Name="ContId" Member="ContactId" />
    <Column Name="ContactName" Member="ContactName1" />
    <Column Name="Category" Member="Cat" Type="String"/>
    <IncludeHiddenColumns />
  <ExcludeContentType Name="Order"/>
  <List Name="Team Members" Type="TeamMember">
    <ContentType Name="Item" Class="TeamMember" />