Monday, 22 April 2013
How to change the date format of a DataBinder.Eval (DataList) in asp.net?
05:15
Anonymous
No comments
Here is the example:
<asp:DataList ID="dlistRightSide" runat="server">
<ItemTemplate>
<ul>
<li><span><asp:Label ID="lblRightSideName" runat="server" ><%# DataBinder.Eval(Container.DataItem, "FirstName")%> <%# DataBinder.Eval(Container.DataItem, " LastName ")%></asp:Label></span></li>
<li><asp:Label ID="lblRightSideJoinDate" runat="server" ><%# DataBinder.Eval(Container.DataItem, "CreatedDate", "{0:MMM d, yyyy}")%></asp:Label></li>
<li><asp:HyperLink ID="hlinkRightSideViewTree" runat="server">View in Tree</asp:HyperLink></li>
</ul>
</ItemTemplate>
</asp:DataList>
0 comments:
Post a Comment