怎样在日历控件中怎么添加特殊节日
在日历控件中怎么把自定义的节日加上显示呢?
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));
}
}