You can give any day, any color you like. For instance create a web page.
Drag a Calendar control on it. In the code behind do the following:
using System;
using System.Drawing;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebCalendar
{
/// <summary>
/// Summary description for WebForm1.
/// </summary>
public class WebForm1 : Page
{
protected Calendar Calendar1;
private void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
CalendarDay day = e.Day;
if (IsMyBirthDay(day.Date ))
{
e.Cell.BackColor = Color.Red;
}
}
private bool IsMyBirthDay(DateTime date)
{
if (date.Day == 23 && date.Month == 8)
return true;
return false;
}
}
}
This worked already in VS 2003 by the way
Cheers,
Rick.
"Martin" wrote:
Hi !
Someone could help me to know how to customize the MonthCalendar in
..NET 2.0 ? I would like to be able to change the color of every day in
a month...
Does Microsoft has released the code of this component ?
Thanks !
Martin