Can I have more than one Views directory in MVC?

4

I'm transferring my project to MVC, and would like to know if you can have more than one Views folder in the project, or if you have a CSS load outside of BundleConfig , have a static page somewhere bugar all my pages.

    
asked by anonymous 06.05.2017 / 20:36

2 answers

3

You can organize it any way you want. The disposition of where things stay does not matter. Of course it is very easy to maintain the standard that Visual Studio already knows to work well. There's no problem working with static pages.

When you return to view you can do something like this:

return View("~/Views/Cadatros/Cliente.cshtml")

You can also configure routes to route as you want in different folders. See RazorViewEngine .

Tips for learning more .

    
08.05.2017 / 02:20
0

You can also load CSS outside the BundleConfig, just insert <link href="@Url.Content("~/Content/seu-css.css")" rel="stylesheet" /> into the view you want.

    
09.05.2017 / 14:44