views:

558

answers:

1

I want sub-folders in my MVC application, so the current routes just don't cut it.

I've got a folder structure such as

Views/Accounts/ClientBalances/MyReport.aspx

and I'm wanting a URL such as http://myapp/Accounts/ClientBalances/MyReport. How do you achieve this with mapping routes? I've had a bash but I'm not very savvy with them. I thought it'd be along the lines of

 routes.MapRoute( _
        "Accounts/ClientBalances", _
        "Accounts/ClientBalances/{controller}/{action}/{id}", _
        New With {.controller = "Home", .action = "Index", .id = ""} _
    )

I've had no luck though. Any ideas?

+2  A: 

The location of the view has nothing to do with the route. Your views should be in Views/[ControllerName]

Derek Ekins