protected void Calendar1_SelectionChanged(object sender, EventArgs e)
 {
     //passing selected date to the getClassess functions
     //more information in DBConnection class
     sessions = DBconnection.getClasses(false, Calendar1.SelectedDate.Date);
     displaySessions(sessions);
 }
 protected void btn_showAll_Click(object sender, EventArgs e)
 {
     //get new data from the database and display it to the user
     //more information about the function used below in DBConnection class
     sessions = DBconnection.getClasses(true, DateTime.Now.Date);
     //display sessions
     displaySessions(sessions);
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     //if the page is loaded for the first time, read all sessions from the database and display them
     if (!Page.IsPostBack)
     {
         sessions = DBconnection.getClasses(true, DateTime.Now.Date);
         displaySessions(sessions);
     }
     //clear the delected date every time the page loads
     Calendar1.SelectedDates.Clear();
 }