{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DateTime today = System.DateTime.Today;
DateTime yesterday = today.AddDays(-1);
DateTime tomorrow = today.AddDays(1);
DateTimeLoan.Items.Add(
String.Format("{0:dd MMM yyyy}",
today));
DateTimeLoan.Items.Add(
String.Format("{0:dd MMM yyyy}",
yesterday));
DateTimeLoan.Items.Add(
String.Format("{0:dd MMM yyyy}",
tomorrow));
}
}
protected void DateTimeLoan_SelectedIndexChanged(object sender,
EventArgs e)
{
Calendar1.TodaysDate =
DateTime.ParseExact(DateTimeLoan.SelectedItem.Text);
}
}