i am retrieving date from database into textbox which textmode is date, but date is not getting displaying
SqlCommand cmde = new SqlCommand("Sp_Retrieve_Pay_M", con);
cmde.CommandType = CommandType.StoredProcedure;
cmde.Parameters.AddWithValue("@ID", lbrecid.Text);
cmde.Connection = con;
try
{
con.Open();
SqlDataReader sdr = cmde.ExecuteReader();
while (sdr.Read())
{
txtentdate.Text = sdr["Pay_Date"].ToString();
}
}
catch (Exception ex)
{
throw ex;
}
finally
{
}
con.Close();
Date :<asp:TextBox ID="txtentdate" TextMode="Date" Width="134px" runat="server"></asp:TextBox>