This is an example of how to have an action that is only called upon a page post and this code also suggests that one may get back something in the shape of a model from a form in lieu of a FormCollection.
public ActionResult Create()
{
FooModel fooModel = getWhatever();
return View(fooModel);
}
[HttpPost]
public ActionResult Create(FooModel fooModel)
{
Whatever...
No comments:
Post a Comment