August 2018
Intermediate to advanced
298 pages
5h 33m
English
Instead of passing the routing values as Route attributes, we can pass the routing values in HTTP action verbs, such as HTTPGet and HTTPPost.
In the following code, we have used the HTTPGet attribute to pass the route values. For the Index method, we did not pass any value and hence no route value will get appended to the route value defined at the controller method level. For the Index2 method, we are passing the Index3 value. Index3 will get appended to the route value defined at the controller level. Please note that only URLs with GET methods will be mapped to the action methods. If you access the same URL pattern with the POST method, these routes will not get matched and ...
Read now
Unlock full access