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)
Syntax
'Declaration
Public Overrides Function GetFieldValueAsHtml ( _
value As Object _
) As String
'Usage
Dim instance As TaxonomyField
Dim value As Object
Dim returnValue As String
returnValue = instance.GetFieldValueAsHtml(value)
public override string GetFieldValueAsHtml(
Object value
)
Parameters
value
Type: System.ObjectAn 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.
Remarks
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.