I have an older ASP.NET MVC application that uses classic web forms views. As an experiment, we've started to mix in some razor views. Unfortunately, the default precedence for where to find the desired view isn't what I want. MVC first looks in your /Views/ControllerName folder for aspx and ascx files. Then it moves to your /Views/Shared for aspx and ascx files. Then it starts over looking for .cshtml and .vbhtml files. What I want is for it not to go into the Shared folder until it's exhausted all the possibilities in the /Views/ControllerName folder. How do I do this?
--- UPDATE ---
Here's some additional information that might help explain what I'm after. By default, I get this search order:
~/Views/Home/Index.aspx
~/Views/Home/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx
~/Views/Home/Index.cshtml
~/Views/Home/Index.vbhtml
~/Views/Shared/Index.cshtml
~/Views/Shared/Index.vbhtml
What I want is this:
~/Views/Home/Index.aspx
~/Views/Home/Index.ascx
~/Views/Home/Index.cshtml
~/Views/Home/Index.vbhtml
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx
~/Views/Shared/Index.cshtml
~/Views/Shared/Index.vbhtml
In other words, it shouldn't search Shared before it searches the /Views/ControllerName folder completely.