Beispiel #1
0
 public ActionResult Edit(Course viewobj)
 {
     if (ModelState.IsValid)
     {
         dblogic.EditCourse(viewobj);
         // Here we want to execure the Details method again on the controller so that this action is performed after the edit
         return(RedirectToAction("Details", new { id = viewobj.Id }));
     }
     // If the model state is not valid, then the same edit page will be returned to the user
     return(View(viewobj));
 }