Skip to content

Instantly share code, notes, and snippets.

@JorritSalverda
Created February 8, 2011 13:37
Show Gist options
  • Save JorritSalverda/816451 to your computer and use it in GitHub Desktop.
Save JorritSalverda/816451 to your computer and use it in GitHub Desktop.
mvc binding snippet #1
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create(BlogItem blogItem)
{
if (ModelState.IsValid)
{
...
return RedirectToAction("OtherAction");
}
return View(blogItem);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment