Donate

Format Date Values Shown In Label Control Inside An ASP.NET Web Forms Gridview

Reference: Set Date Format in Gridview
To format date as short date format of a label control inside a template field use Bind() as shown below:
1:  <ItemTemplate>  
2:    <asp:Label id="lblDateRec" runat="server" Text='<%#   
3:    Bind("GeneratedDateRec", "{0:MM/dd/yyyy}") %>'></asp:Label>  
4:  </ItemTemplate>  

Comments

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

How To Insert Or Add Emojis In Microsoft Teams Status Message

Bootstrap Modal In ASP.NET MVC With CRUD Operations