Column2 Element (View)
Used in rendering a hyperlink. In Microsoft SharePoint Foundation, hyperlinks are stored as two separate values. The actual URL value is stored as one value, and the descriptive text is stored as the other. In a Link field, <Column/> returns the value of the URL, and <Column2/> returns the descriptive text of the hyperlink.
<Column2 AutoHyperLink = "TRUE" | "FALSE" AutoHyperLinkNoEncoding = "TRUE" | "FALSE" AutoNewLine = "TRUE" | "FALSE" Default = "Text" ExpandXML = "TRUE" | "FALSE" HTMLEncode = "TRUE" | "FALSE" Name = "Text" ShowField = "Text" StripWS = "TRUE" | "FALSE" URLEncode = "TRUE" | "FALSE" URLEncodeAsURL = "TRUE" | "FALSE"> </Column2>
Optional Boolean. TRUE to surround text with <A> tags if the text appears like a hyperlink (for example, www.microsoft.com).
Optional Boolean. TRUE to surround text with <A> tags if the text appears like a hyperlink (for example, www.microsoft.com) but without HTML encoding.
Optional Boolean. TRUE to insert <BR> tags into the text stream and to replace multiple spaces with a nonbreaking space ( ).
Optional Text. Renders the text assigned to this attribute if the value returned by a selection is an empty string ("").
Optional Boolean. TRUE to re-pass the rendered content through the Collaborative Application Markup Language (CAML) interpreter, which allows CAML to render CAML.
Optional Boolean. TRUE to convert 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.
Optional Text. Allows the Column element to be used outside the field rendering context by supplying an ID (for example, <Column Name="ID"/>).
Optional Text. The ShowField attribute can be set to the column name to display. By default, a hyperlinked text from the Title column of the record in the external list is displayed. But the ShowField attribute can be used to override that and display another field from the external list.
The following data types are allowed as targets of a ShowField attribute: Text, Choice, and Counter.
Optional Boolean. TRUE to remove white space from the beginning and end of the value returned by the element.
Optional Boolean. TRUE to convert special characters, such as spaces, to quoted UTF-8 format (for example, %c3%ab for character ë).
Optional Boolean. Like URLEncode, but TRUE to specify that the string to encode is a path component of a URL so that forward slashes ("/") are not encoded.
The following Switch statement evaluates the Column2 value and, if it is 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.