Update routing.md

pull/3065/head
Rick Anderson 2017-03-24 11:29:50 -10:00 committed by GitHub
parent 8a2425c3e1
commit 19f6ada655
1 changed files with 2 additions and 0 deletions

View File

@ -290,6 +290,8 @@ public class MyDemoController : Controller
> [!NOTE]
> The route templates above don't define route parameters for `action`, `area`, and `controller`. In fact, these route parameters are not allowed in attribute routes. Since the route template is already associated with an action, it wouldn't make sense to parse the action name from the URL.
## Attribute routing with Http[Verb] attributes
Attribute routing can also make use of the `Http[Verb]` attributes such as `HttpPostAttribute`. All of these attributes can accept a route template. This example shows two actions that match the same route template:
<!-- literal_block {"ids": [], "names": [], "highlight_args": {}, "backrefs": [], "dupnames": [], "linenos": false, "classes": [], "xml:space": "preserve", "language": "c#"} -->