i am using ajaxcontrolkit in my project , only use its calender
but problem is that after selected a date from calender when i press
submit button after reload he show the same default date which is
current day date not my selected date and also in my server side code
when i pick date from textbox it also give me the default current date
not the selected date
please any body know about this problem, tell me thanks
Loading

Guest UserRank #1,422 · 1.2K reputationPosted Aug 19, 2008, 10:30 AM EDT
Page_Load()
{
if (!IsPostBack)
{
DateControl.SelectedDate = DateTime.Today;
}
}
shahid13 reputationPosted Aug 19, 2008, 12:20 PM EDT
if (!IsPostBack)
{
CalendarExtender1.SelectedDate = DateTime.Now.Date;
DateTime date = DateTime.Now.Date;
tb_select_date.Text = date.Date.ToShortDateString();
GenerateEmployeeList(date);
}
and button click code is this
protected void Button1_Click(object sender, EventArgs e)
{
DateTime date = Convert.ToDateTime(tb_select_date.Text);
GenerateEmployeeList(date);
}
html page
this html page code is enclose in a contentplaceholder master page
Guest UserRank #1,422 · 1.2K reputationPosted Aug 19, 2008, 1:32 PM EDT
Guest UserRank #1,422 · 1.2K reputationPosted Aug 19, 2008, 1:34 PM EDT
protected void Button1_Click(object sender, EventArgs e)
{
DateTime date = Convert.ToDateTime(tb_select_date.Text);
CalendarExtender1.SelectedDate = date; // add this line
}
shahid13 reputationPosted Aug 31, 2008, 4:55 AM EDT