We display an ASP.NET calendar control and update the color and if the day is enabled with the DayRender event. This process is a bit slow so I'm trying to map out a strategy to cache the results of the all the DayRenders. Basically take a snapshot of the calendar and cache it for X minutes. Where would I hook into the page/control workflow to accomplish this goal?
A:
I ended up caching two new lists as class variables:
- _calandarTableCellList As List(Of System.Web.UI.WebControls.TableCell)
- _calendarDayList As List(Of System.Web.UI.WebControls.CalendarDay)
Then in the Calendar.DayRender event set the value for each day for matching item in the list.
Josh
2010-09-14 16:22:32