wordpress

Routing in MVC?

 In the ASP.NET Web Forms application, every URL must match with a specific .aspx file. For example, a URL http://domain/studentsinfo.aspx must match with the file studentsinfo.aspx that contains code and markup for rendering a response to the browser.

Ex:

As you can see in the above figure, the route is configured using the MapRoute() extension method of RouteCollection, where name is “Default”, url pattern is “{controller}/{action}/{id}” and defaults parameter for controller, action method and id parameter. Defaults specifies which controller, action method or value of id parameter should be used if they do not exist in the incoming request URL