Retrieve Date in GridView By dd/MM/yyyy Format In ASP .Net C#


<asp:GridView ID="gridexport" runat="server" AllowPaging="True"  visible="true"
          AllowSorting="True" AutoGenerateColumns="False" EmptyDataText="No Records" 
                                                      OnPageIndexChanging="view_PageIndexChanging" >
                <Columns>
                    <asp:TemplateField HeaderText="Date">
                        <ItemTemplate>
                            <%# DataBinder.Eval(Container.DataItem, "attdate", "{0:dd-MM-yyyy}")%>
                        </ItemTemplate>
                    </asp:TemplateField>
         </Columns>
     </asp:GridView>

Comments

Popular posts from this blog

Display Canvasjs Line Chart using Data from Database

What are the SOLID principles, and why are they important

Write Text in Notepad files Using Asp.net