When you apply the AcceptVerbs attribute to an overloaded action method in a controller, ASP.NET MVC will trigger the right action method based on the HTTP verb.
Below you find a list of code examples that have been added for this attribute.
To have an action method in an ASP.NET MVC Controller handle post requests, you apply the attribute as follows:
[AcceptVerbs(HttpVerbs.Post)] public ActionResult Edit(int id, FormCollection formContents) { // Implementation to handle an Edit POST here }
Specifying HttpVerbs.Get or leaving out the attribute altogether marks the method as a GET request handler.
Below you find a list of links that are relevant for this attribute.