CODE TO SHOW ONLY DATE FORMAT IN GRIDVIEW

Debendra256
Posted by Debendra256 under ASP.NET category on | Points: 40 | Views : 1738

<asp:TemplateField HeaderText="Date_Of_Entry" SortExpression="Date_Of_Entry">
<EditItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("Date_Of_Entry","{0:M-dd-yyyy}") %>' ></asp:Label>
</EditItemTemplate<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("Date_Of_Entry","{0:M-dd-yyyy}") %>'></asp:Label>
</ItemTemplate>

Comments or Responses

Login to post response