SPFieldCurrency.GetFieldValueAsHtml method (Double, CultureInfo, Int32, SPNumberFormatTypes)
為了要能夠呈現直接在網頁上的欄位值,以 HTML 格式傳回欄位值。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Shared Function GetFieldValueAsHtml ( _
data As Double, _
culture As CultureInfo, _
currencyLocaleId As Integer, _
displayFormat As SPNumberFormatTypes _
) As String
'用途
Dim data As Double
Dim culture As CultureInfo
Dim currencyLocaleId As Integer
Dim displayFormat As SPNumberFormatTypes
Dim returnValue As String
returnValue = SPFieldCurrency.GetFieldValueAsHtml(data, _
culture, currencyLocaleId, displayFormat)
public static string GetFieldValueAsHtml(
double data,
CultureInfo culture,
int currencyLocaleId,
SPNumberFormatTypes displayFormat
)
參數
data
Type: System.DoubleSystem.Double物件,表示要轉換成 HTML 格式的值。
culture
Type: System.Globalization.CultureInfoSystem.Globalization.CultureInfo物件,包含表示透過欄位的特定文化特性的相關資訊。
currencyLocaleId
Type: System.Int3232 位元的整數,指定欄位的地區設定 ID。
displayFormat
Type: Microsoft.SharePoint.SPNumberFormatTypes指定要使用的小數位數的SPNumberFormatTypes值。
傳回值
Type: System.String
字串,包含以 HTML 格式的值。