I'm using Standard Numeric Format Strings (see here) to format pricing on my page:
Dim price As Integer = 378
Dim s As String = (CDec(price) / 100).ToString("F")
Unless the text is automatically HTML encoded (and you have access to the source of all this) you can use the
To superscript only the
78 part just split the string by
. if that is the case) into an array and join it together again with the tag included.
Dim Parts() As String = s.Split(If(s.Contains("."), ".", ",")) Dim s2 As String = Parts(0) & ",<sup>" & Parts(1) & "</sup>"