The Database Data is stored as:
To begin with User Interface Drag and drop
- Calendar Control
- DataGrid
Now our code. :
In Page_Load
- Fill the DataSet
In Calendar1_PreRender
- Check for it the Date is from OtherMonth
- Navigate through the DataSet if Date is not from other month
- Check if the date is null
- If not Set the BackColor for the Date based on the value in the DataBase
In Calendar1_SelectionChanged
- Based on the date Selected in the Calendar Control display the Data in the Datagrid.
The Output of this code:
![]() |