MVC Routing

What are the ways of routing when the razor page is multiple folders deep?

  • Views (folder)

    • Admin (folder)

      • Category (folder)

        • Categories.cshtml (razor page)

I found that the following works (within the controller), just curious if there are other ways of achieving the same goal.

return View("~/Views/Admin/Category/Categories.cshtml", CategoryManager.Categories); 

by Rec0de via /r/csharp

Leave a Reply