Formatting DataBinder.Eval data

后端 未结 10 1141
眼角桃花
眼角桃花 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:12

    You can use it this way in aspx page

    <%# DataBinder.Eval(Container.DataItem, "DateColoumnName", "{0:dd-MMM-yyyy}") %>
    

提交回复
热议问题