Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have dropdowlist and i have added calender control on dropdownlist i want to show perticular date selected in dropdown but it shows todays date.plz help me.
Posted
Comments
harshavardhan12345678 13-Sep-14 1:01am    
send me ur code
Member 9027346 13-Sep-14 1:22am    
strcycle = "select StartRtc from xyz where jobid is null LIMIT 1"
SectionCmd.CommandText = strcycle
sectionADpt.Fill(dt5)

Dim dtdatestr As Date = Convert.ToDateTime(dt5.Rows(0).ItemArray(0).ToString())
dtpDate.Text = Format(dtdatestr, "dd-MM-yyyy")
' dtpDate.Value = dtpDate.Text
harshavardhan12345678 13-Sep-14 1:11am    
i send example..
harshavardhan12345678 13-Sep-14 1:19am    
have u got the solution
MuhammadUSman1 13-Sep-14 1:50am    
Please fire selectedIndex change event of dropdownlist. and then set selected index value to dtpDate

1 solution

C#
protected void Calendar1_SelectionChanged(object sender,
                                          EventArgs e)
{
    lblday.Text = Calendar1.TodaysDate.ToShortDateString();
    lblbday.Text = Calendar1.SelectedDate.ToShortDateString();
}
 
Share this answer
 

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