title: How to specify the view location in asp.net core mvc when using custom locations?
body: <p>Let's say I have a controller that uses attribute based routing to handle a requested url of /admin/product  like so:</p>
  
  <pre class="lang-cs prettyprint-override"><code>[Route("admin/[controller]")]        
  public class ProductController: Controller {
  
      // GET: /admin/product
      [Route("")]
      public IActionResult Index() {
  
          return View();
      }
  }
  </code></pre>
  
  <p>Now let's say that I'd like to keep my views organized in a folder structure that roughly reflects the url paths they are related to.  So I'd like the view for this controller to be located here:</p>
  
  <pre><code>/Views/Admin/Product.cshtml
  </code></pre>
  
  <p>To go further, if I had a controller like this:</p>
  
  <pre class="lang-cs prettyprint-override"><code>[Route("admin/marketing/[controller]")]        
  public class PromoCodeListController: Controller {
  
      // GET: /admin/marketing/promocodelist
      [Route("")]
      public IActionResult Index() {
  
          return View();
      }
  }
  </code></pre>
  
  <p>I would like the framework to automatically look for it's view here:</p>
  
  <pre><code>Views/Admin/Marketing/PromoCodeList.cshtml
  </code></pre>
  
  <p>Ideally the approach for informing the framework of the view location would work in a general fashion based on the attribute based route information regardless of how many url segments are involved (ie. how deeply nested it is).</p>
  
  <p>How can I instruct the the Core MVC framework (I'm currently using RC1) to look for the controller's view in such a location?</p>