SPFieldNumber.GetFieldValueAsHtml 方法 (Double, CultureInfo, Boolean, SPNumberFormatTypes)

基于指定的数据、 区域性信息、 Boolean 值,和数字格式以呈现直接在页面上的字段值的 HTML 格式返回字段值。

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public Shared Function GetFieldValueAsHtml ( _
    data As Double, _
    culture As CultureInfo, _
    showAsPercentage As Boolean, _
    displayFormat As SPNumberFormatTypes _
) As String
用法
Dim data As Double
Dim culture As CultureInfo
Dim showAsPercentage As Boolean
Dim displayFormat As SPNumberFormatTypes
Dim returnValue As String

returnValue = SPFieldNumber.GetFieldValueAsHtml(data, _
    culture, showAsPercentage, displayFormat)
public static string GetFieldValueAsHtml(
    double data,
    CultureInfo culture,
    bool showAsPercentage,
    SPNumberFormatTypes displayFormat
)

参数

  • data
    类型:System.Double

    一个代表要转换为 HTML 格式的值的System.Double对象。

  • showAsPercentage
    类型:System.Boolean

    true百分比 ; 显示字段值否则为false。

返回值

类型:System.String
一个字符串,包含以 HTML 格式的值。

另请参阅

引用

SPFieldNumber 类

SPFieldNumber 成员

GetFieldValueAsHtml 重载

Microsoft.SharePoint 命名空间