Created
February 2, 2012 14:19
-
-
Save hanssens/1723673 to your computer and use it in GitHub Desktop.
[C#] MVC3 Default Controller Actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Default MVC 3 Controller Actions | |
/// </summary> | |
public class ObjectController : Controller | |
{ | |
// GET: /Object/ | |
public ActionResult Index() | |
// GET: /Object/Details/5 | |
public ActionResult Details(int id) | |
// GET: /Object/Create | |
public ActionResult Create() | |
// POST: /Object/Create | |
[HttpPost] | |
public ActionResult Create(FormCollection collection) | |
// GET: /Object/Edit/5 | |
public ActionResult Edit(int id) | |
// POST: /Object/Edit/5 | |
[HttpPost] | |
public ActionResult Edit(int id, FormCollection collection) | |
// GET: /Object/Delete/5 | |
public ActionResult Delete(int id) | |
// POST: /Object/Delete/5 | |
[HttpPost] | |
public ActionResult Delete(int id, FormCollection collection) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment