Click here to Skip to main content
15,907,906 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all...
I am using JQuery date picker like:
JavaScript
$('#<%= txtdate.ClientID %>').datepicker();
$('#<%= txtdate.ClientID %>').datepicker('option',{dateFormat:'dd/mm/yy'});

On button click I am trying to fetch date from database and insert into text box
like this: and am sure date coming to data reader
C#
txtdate.Text = dr["date"].ToString();

But it won't show the date in the text box. Can any one help me please?

Thanks in advance
Posted
Updated 21-Sep-11 1:58am
v3

Have you run the site under the debugger to ensure that the data isn't null?
 
Share this answer
 
Comments
tulasiram3975 21-Sep-11 8:45am    
yes the date is coming to the data reader
it is displayed in label
Use this


txtdate.Text = dr["date"].ToString("dd/MM/yyyy");
 
Share this answer
 
v2
Comments
tulasiram3975 22-Sep-11 2:45am    
dear sandeep08mca,
it is returning dd/mm/yyyy formate only no need to cast it again it won't work out because its a string not a date

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