ASP.NET MVC AcceptVerbs and registering routes

Posted by Pure.Krome on Stack Overflow See other posts from Stack Overflow or by Pure.Krome
Published on 2008-11-12T07:00:46Z Indexed on 2010/03/30 23:13 UTC
Read the original article Hit count: 299

Hi Folks,

do I have to register the HttpVerb constraint in my route definition (when i'm registering routes) if i have decorated my action method with the [AcceptVerbs(..)] attribute already?

eg. i have this.

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create(FormCollection formCollection)
{ .. }

do i need to add this to the route that refers to this action, as a constraint?

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about routes