Duration: 21 minutes
Summary: In this video we discuss the Calendar control in more detail. Specifically, we are going to retrieve some events (holidays) from the database and render those specific events differently on the calendar. We start by creating a database TestASPNET that we are going to use in this and upcoming videos. We create one table named Holidays that contains the holidays’ dates and their descriptions. Once we are done with that, we modify the page to read the data from the Holidays table using ADO.NET. We read the data and put it in 2 generic lists (one for the holiday and one for the description). We handle the DayRender event and for every day rendered, we look to see if it matches one of our holidays. If it does, we change the background color of the day, we disable it selection, and make its tooltip the description we retrieved from the database. We will discuss ADO.NET in more details in upcoming videos.
Methodology of the development of example: Good coding standard and simplified design to illustrate the key points.
Technology Used: ASP.NET and Visual Studio 2010
Keyword: ASP.NET 4, Visual Studio 2010, SqlDataReader, SqlCommand, SqlConnection, DayRender, IsSelectable, ToolTip, BackColor, List, dateTime.