Chinmaya Dash
Explain attribute based routing in MVC?
By Chinmaya Dash in HTML 5 on Oct 13 2016
  • Chinmaya Dash
    Oct, 2016 13

    This is a feature introduced in MVC 5. By using the "Route" attribute we can define the URL structure. For example in the below code we have decorated the "GotoAbout" action with the route attribute. The route attribute says that the "GotoAbout" can be invoked using the URL structure "Users/about".public class HomeController : Controller {[Route("Users/about")]public ActionResult GotoAbout(){return View();} }

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS