Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

asp net route attribute vs httpget

Route is method unspecific, whereas HttpGet obviously implies that only GET requests will be accepted. Generally, you want to use the specific attributes: HttpGet, HttpPost, etc. Route should be used mostly on controllers to specify the base path for all actions in that controller. The one exception is if you're creating routes for exception handling / status code pages. Then, you should use Route on those actions, since requests via multiple methods could potentially be routed there.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #asp #net #route #attribute #httpget
ADD COMMENT
Topic
Name
7+8 =