Column2 Element

The Column2 element is used in rendering a Link field type. In SharePoint Team Services from Microsoft, hyperlinks are stored as two separate values. The actual URL value is stored in one part, and the descriptive text is stored in another. In a Link field, <Column/> returns the value of the URL, and <Column2/> returns the descriptive text of the hyperlink.

Syntax

<Column2
  HTMLEncode = "TRUE" | "FALSE">
</Column2>

Attributes

Name Description
HTMLEncode Optional Boolean. Converts embedded characters so that they are displayed as text in the browser. In other words, characters that could be confused with HTML tags are converted to entities.
Parent Elements
Case, Default, Expr, ScriptQuote

Example

The following Switch statement evaluates the Column2 value and, if it's empty, sets the HTML encoding of the Column element value (in other words, of the URL) to TRUE. Otherwise, it sets the HTML encoding of the URL's descriptive text to TRUE.

<Switch>
  <Expr>
    <Column2/>
  </Expr>
  <Case Value="">
    <Column HTMLEncode="TRUE"/>
  </Case>
  <Default>
    <Column2 HTMLEncode="TRUE"/>
  </Default>
</Switch>

See Also

Column

Universal Attributes for Page Rendering Elements