Calendar control

  • Thread starter Thread starter Mystique
  • Start date Start date
M

Mystique

Hello,
I am building a page with the ASP.NET Calendar control. Is there any way
i can change the style (ex: background) of certain days, but not one
day, an interval of days (ex: 3,5,6,7)?

Thanks,
Mystiue
 
You can do this by implementing DayRender event

protected void calendar1_DayRender(object sender,
System.Web.UI.WebControls.DayRenderEventArgs e)

{

if (DateTime.Now == e.Day.Date)

e.Cell.BackColor = System.Drawing.Color.FromArgb(255, 234, 234);

}
 
Thanks Eirik,
but how can i change the background of the clicked item plus the next 7
items?
 
Back
Top