Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

TaxonomyField.GetFieldValueAsHtml method

Returns the field value in HTML format in order to render the field valuedirectly on a page.

Namespace:  Microsoft.SharePoint.Taxonomy
Assembly:  Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)
public override string GetFieldValueAsHtml(
	Object value
)

Parameters

value
Type: System.Object

An object of type TaxonomyFieldValueor TaxonomyFieldValueCollection that represents the value to convert.

Return value

Type: System.String
A string that contains the value in HTML format.

If the AllowMultipleValues property of the TaxonomyField object is false, the value parameter is expected to be of type TaxonomyFieldValue or SPFieldLookupValue or have an accurate string representation returned by the ToString method.

If the AllowMultipleValues property of the TaxonomyField object is true, the value parameter is expected to be of type TaxonomyFieldValueCollection or SPFieldLookupValueCollection or have an accurate string representation returned by the ToString method. The HTML returned by this method will contain each value in the collection separated by a semi-colon character.

If the value parameter is a SPFieldLookupValue object or SPFieldLookupValueCollection object, the returned string will be HTML encoded.

If the value parameter is a null reference (Nothing in Visual Basic), an empty string is returned.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.