private void Calendar1_SelectionChanged(object sender, System.EventArgs e)
{
string  dt=this.Calendar1.SelectedDate.ToString(); this.Response .Redirect("a.apx?dt="+dt); 
}
在a.aspx ,,可以用2个datagrid,标题和内容,都根据传来的日期确定。构造一个表,
   然后绑定就可了。

解决方案 »

  1.   

    先用参数将选择的日期传递到第二个页面。
    string dt = this.Calendar1.SelectedDate.ToString("yyyyMMdd");
    this.Response .Redirect("a.apx?dt="+dt); 
    在第二个页面将日期参数转换到日期类型。
    dt = request.params["dt"];
    int year = int.Parse(dt.Substring(0,4));
    int month = int.Parse(dt.Substring(4,2));
    int day = int.Parse(dt.Substring(6,2));
    DateTime SelDate = new DateTime(year,month,day);
    取出一周的第一天和最后一天
    int n = (int)SelDate.DayOfWeek;
    string SWeek = SelDate.AddDays(-1-n).ToString("yyyy-MM-dd");
    string EWeek = SelDate.AddDays(6-n).ToString("yyyy-MM-dd");
    然后比较日期在SWeek和EWeek之间的得到第一张表
    日期的年月和SelDate中的年月相同的得到第二张表