ASP.NET GridView,DataList,Repeater日付フォーマット表示
919 ワード
Repeater , :
<%#DataBinder.Eval(Container.DataItem,"Title")%>
:2005-12-16 11:52:01
Repeater :2005-12-16
:
<%#Convert.ToDateTime(DataBinder.Eval(Container.DataItem,"PostTime")).ToShortDateString()%>
!
:<%#Convert.ToDateTime(Eval("intime")).ToShortDateString()%>
<%#Eval("PubDate","{0:yyyy-MM-dd}")%>
Repeat :<%# Container.ItemIndex + 1%>
<asp:Repeater ID="rptService" runat="server">
<ItemTemplate>
<div class="service_box">
<p><span><%# Container.ItemIndex + 1%></span> <%#Eval("Title") %></p>
<p><%#Eval("Content") %></p>/div>
</ItemTemplate>
</asp:Repeater>