public ActionResult Create(StudentModel iList) { if (ModelState.IsValid) { StudentHandler IHandler = new StudentHandler(); if (IHandler.InsertStudent(iList)) { ViewBag.AlertMsg = "Item Added successfully"; ModelState.Clear(); } else { ViewBag.AlertMsg = "Item Add Failed"; ModelState.Clear(); } } ClassHandler gHandler = new ClassHandler(); List <ClassModel> classlist = new List <ClassModel>(); classlist = gHandler.GetClassList().ToList(); classlist.Insert(0, new ClassModel() { ClassID = 0, ClassName = "Select" }); ViewBag.ListOfClasses = classlist; return(View()); }