Exemple #1
0
 public ActionResult Create(CreateRibbitViewModel model)
 {
     if (ModelState.IsValid)
     {
         Ribbits.Create(Security.UserId, model.Status);
         Response.Redirect("/");
     }
     return(PartialView("_CreateRibbitPartial", model));
 }
Exemple #2
0
 public ActionResult Create(CreateRibbitViewModel model)
 {
     if (ModelState.IsValid)
     {
         Ribbits.Create(Security.UserId, model.Status);
         //because this a child action, we cannot redirect to another action, if we want to redirect we have to use the below
         //THE BELOW PRODUCES A HTTP HEADER ERROR
         //Response.Redirect("/");
         //var timeline = Ribbits.GetTimelineFor(Security.UserId).ToArray();
         //return View("Timeline", timeline);
     }
     return(PartialView("_CreateRibbitPartial", model));
 }