Formatting DataBinder.Eval data

后端 未结 10 1095
眼角桃花
眼角桃花 2020-12-08 04:33

How can I format data coming from a DataBinder.Eval statement in an ASPX page?

For example, I want to display the published date of the news items in a particular fo

10条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-08 05:20

    Thanks to all. I had been stuck on standard format strings for some time. I also used a custom function in VB.

    Mark Up:-

    
    

    Code behind:-

    Public Function fLabel(ByVal tval) As String
       fLabel = tval.ToString("#,##0.00%;(#,##0.00%);Zero")
    End Function
    

提交回复
热议问题