Click here to Skip to main content
15,902,114 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have gridview with one Template field having item Template and EditTemplate
item template having labe is showing date but when we switch to edit mode Date is not shown in TextBox TextBox having Property TextMode="Date"

What I have tried:

<asp:TemplateField HeaderText=" Loan Deduction Date">
<itemtemplate>
<asp:Label ID="lblLoan_Deduction_Date" runat="server" Text='<%#Eval("Loan_Deduction_Date") %>' DataFormatString="{0:MM/dd/yyyy }" HtmlEncode="false">

<edititemtemplate>
<asp:TextBox ID="txtLoan_Deduction_Date" runat="server" Text='<%# Convert.ToDateTime(Eval("Loan_Deduction_Date")).ToString("dd/MM/yyyy")%>' TextMode="Date">






This is my Select Query
=======================
select CONVERT(Date,Loan_deduction_date,103) as Loan_deduction_date from loans_deduction_details
Posted
Updated 3-May-18 2:21am
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900