// GET: Lesson public ActionResult Index(int?SelectedCourse) { List <Course> courses = lessonB.CourseList(); ViewBag.SelectedCourse = new SelectList(courses, "CourseID", "Title", SelectedCourse); int courseID = SelectedCourse.GetValueOrDefault(); return(View(lessonB.ListeFiltreLesson(SelectedCourse, courseID).ToList())); }