共用方式為


TaxonomyField.GetFieldValueAsHtml 方法

傳回以 HTML 格式的欄位值,才能呈現欄位 valuedirectly,在頁面上。

命名空間:  Microsoft.SharePoint.Client.Taxonomy
組件:   Microsoft.SharePoint.Client.Taxonomy.Silverlight (在 Microsoft.SharePoint.Client.Taxonomy.Silverlight.dll 中);  Microsoft.SharePoint.Client.Taxonomy.Phone (在 Microsoft.SharePoint.Client.Taxonomy.Phone.dll 中)  Microsoft.SharePoint.Client.Taxonomy (在 Microsoft.SharePoint.Client.Taxonomy.dll 中)

語法

'宣告
Public Overridable Function GetFieldValueAsHtml ( _
    value As Object _
) As ClientResult(Of String)
'用途
Dim instance As TaxonomyField
Dim value As Object
Dim returnValue As ClientResult(Of String)

returnValue = instance.GetFieldValueAsHtml(value)
public virtual ClientResult<string> GetFieldValueAsHtml(
    Object value
)

參數

傳回值

類型:Microsoft.SharePoint.Client.ClientResult<String>
字串,包含 HTML 格式中的值。

備註

如果AllowMultipleValues物件的屬性TaxonomyFieldfalse, value參數預期類型TaxonomyFieldValueSPFieldLookupValue擔任或擁有ToString方法傳回正確的字串表示。

如果AllowMultipleValues物件的屬性TaxonomyFieldtrue, value參數預期類型TaxonomyFieldValueCollectionSPFieldLookupValueCollection擔任或擁有ToString方法傳回正確的字串表示。這個方法所傳回的 HTML 會包含在並以分號分隔字元分隔的集合中的每個值。

如果value參數是SPFieldLookupValue物件或SPFieldLookupValueCollection物件,HTML 編碼頁面時,就會傳回的字串。

如果value參數是null 參考 (未執行任何動作 於 Visual Basic 中),則會傳回空字串。

請參閱

參照

TaxonomyField 類別

TaxonomyField 成員

Microsoft.SharePoint.Client.Taxonomy 命名空間

GetFieldValueAsHtml(Object)

GetFieldValueAsHtml(Object)

Microsoft.SharePoint.Client.Taxonomy

Microsoft.SharePoint