ASP. NET Web API practice series 03, routing templates, routing conventions, routing settings, asp. netapi
The routes of ASP. NET Web APIs are similar to those of ASP. net mvc. routes are also placed in RouteTable. You can set a routing template in WebApiConfig. cs in the Ap
ASP. NET Web API practice series 03, routing templates, routing conventions, routing settings, asp. netapi
The routes of ASP. NET Web APIs are similar to those of ASP. net mvc. routes are also placed in RouteTable. You can set a routing template in WebApiConfig. cs in the Ap
", Routetemplate: "api/{controller}/{action}/{id}", New {id = routeparameter.optional});In the API controller: Public class Bookscontroller:apicontroller{ [HttpGet] Public string Details (int id);}In this case, a format similar to "API/BOOKS/DETAILS/8" is entered in the browser to map to the details (int id) method.You can also use the ActionName property to alias an action: Public class Bookscontroller:apicontroller{ [ActionName ("Sth")] Public Httpresposnemessage getsth (in
') , ' Routelistctl ' }) . When ('/list/:id ', { ' views/route/detail.html ', ' Routedetailctl '} ) . Otherwise ({ '/list ' });In the Routeapp module, we define the routing and layout templates. The default URL for Routeapp is/list, which is http://localhost:9000/demo-route.html#/list. The route of the Jump detail page is/list/:id,id for the parame
; P> inputtype= "Submit"value= "Submit"/> form>Body>HTML>test.htmldef Test (Request): if Request.method = = "GET": Return render (Request, ' Te St.html ') elif Request.method = = "POST": # text V = Request. Post.get (' pwd ') # Gets the input input box with the value print (v) # Radio V0 = Request. Post.get (' Gender ') # gets radio's value print (v0) # checkbox v1 = Request. Post.getlist (' favor ') # Gets the checkbox multiple selection in the case of value print (v1) # Select
Django Routing SystemThe Django routing system allows Django to match the URI and send it to a specific function to process the user request. A bit like Nginx's location function.The Django routing relationship is divided into three types: normal, dynamic, and group distribution. These three relationships are recorded in urls.py.Routing-common RelationshipA norma
Use of angular. js routing and templates in asp.net mvcWe know that angular. js is an excellent js framework based on mvc. It also has its own routing mechanism, which is not the same as asp.net mvc routing. The routes of asp.net mvc are routed to different controllers through different URLs and then presented to the c
Outline
A summary of the content:Ii. Review of the previous sectionThree, Django view –views1, access to a number of user data and file upload2, FBV and CBV3. Decoration DeviceFour, Django template supplement-Django Template language cycle dictionaryFive, Django routing system1, one-to-one: a URL for a function or a class2.1, One-to-many: A class of URLs corresponding to a function or a class2.2, a One-to-many, usage summary3, Name parameter4. URL ro
cycles, starting from 12. Forloop.counter0: Ibid., starting from 03. Forloop.revcounter: Record the number of non-traversed4. Forloop.revcounter0: Ibid., starting from 05. Forloop.first: Boolean value, whether the tag is the first item (usually some style settings for the first and last)6. Forloop.first: Boolean value, whether the tag is the last item3. FilterRun to filter or change the data before displaying the variableGrammar:{{var | filter}}Common filters:1. {{var| upper}}Rewrite English le
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.