protected void semesterDropDownList_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                CourseManager aCourseManager = new CourseManager();
                int departmentId = Convert.ToInt16(departmentDropDownList.Text);
                int semesteId = Convert.ToInt16(semesterDropDownList.Text);
                List<Course> courses = new List<Course>();
                courses = aCourseManager.GetAllCoursesByDepartment(departmentId, semesteId);
                courseDropDownList.DataSource = courses;
                courseDropDownList.DataBind();
            }

            catch (SqlException sqlException)
            {
                msgLabel.ForeColor = Color.Red;
                msgLabel.Text = "Database error.See details error: " + sqlException.Message;

            }
            catch (Exception exception)
            {
                msgLabel.ForeColor = Color.Red;
                string errorMessage = "Unknow error occured.";
                errorMessage += exception.Message;
                if (exception.InnerException != null)
                {
                    errorMessage += exception.InnerException.Message;
                }
                msgLabel.Text = errorMessage;
            }
        }