public ActionResult Create(CreateRibbitViewModel model) { if (ModelState.IsValid) { Ribbits.Create(Security.UserId, model.Status); Response.Redirect("/"); } return(PartialView("_CreateRibbitPartial", model)); }
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)); }