I got a view List.aspx
that is bound to the class Kindergarten
In the controller:
public ActionResult List(int Id)
{
Kindergarten k = (from k1 in _kindergartensRepository.Kindergartens
where k1.Id == Id
select k1).First();
return View(k);
}
That works.
But this doesn't
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Add(...)
{
//...
Kindergarten k = ...
return RedirectToAction("List", k);
}
How should I redirect to the list view, passing k as the model?
Thanks!