
March 27th, 2003, 11:28 PM
|
|
Registered User
|
|
Join Date: Mar 2003
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Help using DayRender in Asp.Net to change Calendar
I am developing an event calendar for my company and am stuck trying to channge the background color of each day that has an event listed in a sql server database.<br>I am trying to write an if statement in the DayRender method usin c# that will compare my <br>e.Day.Date.Day value of the calendar control to my EventDate field in my database. If there is an event in the database for that day, the cell for that day on the calendar should be filled with a different background color. The code that I have for this method is diplayed below.<br>Any help would be greatly appreciated.<br>Thank you,<br>Brian N. <br><br><div class="msgQuoteWrap"><div class="msgCode">void DayRender(Object source, DayRenderEventArgs e)<br>{<br>//Change the background color of days with events and make them selectable<br><br>if (e.Day.Date.Day == ? )<br>{<br>e.Cell.BackColor = System.Drawing.Color.Wheat;<br>}<br>}</div></div>
|