ysjfirst

 

DataGrid绑定日期字段时的格式化 | DataBinder.Eval的格式化

<asp:BoundColumn HeaderText="登记日期" DataField="RegDate" DataFormatString={0:d}></asp:BoundColumn>
显示为:2005-10-24

<asp:BoundColumn HeaderText="登记日期" DataField="RegDate" DataFormatString={0:D}></asp:BoundColumn>
显示为:2005年10月24日

<%#DataBinder.Eval(Container.DataItem,"RetailPrice","{0:c}")%>
显示为¥0.00


<%#DataBinder.Eval(Container.DataItem,"RetailPrice","{0:c}")%>





posted on 2005-10-25 20:06  袁帅钧  阅读(2195)  评论(0编辑  收藏  举报

导航