让日历控件显示自定义节假日提示信息
string[,] holiday = new string[13, 32];
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
holiday[7, 1] = "党的生日";
CalendarDay c = e.Day;
TableCell t = e.Cell;
if (c.IsOtherMonth)
t.Controls.Clear();
else
{
string tmp = holiday[c.Date.Month, c.Date.Day];
if(tmp!=null)
t.Controls.Add(new LiteralControl("<br>"+tmp));
}
}