The views will often be named the same regardless of view engine right (Index, Create, Details etc.)?
The problem was not that I had Index.aspx and Index.cshtml in the same view folder. I understand that it will pick Index.aspx first if I would do that. The problem was that I had Index.cshtml in an Area view folder and Index.aspx in the root view folder
and MVC picks Index.aspx from the root even though the controller with return View("Index") was in the area.
If you do return View("Index") in /Areas/Admin/Controllers/HomeController.cs wouldn't it be more logical and intuitive if it used /Areas/Admin/Views/Home/Index.cshtml rather than /Views/Home/Index.aspx?
Sorry if I'm nagging, I'm just surprised that I'm the only one that thinks this is weird:)
dillenmeiste...
Member
1 Points
6 Posts
Re: Locate view bug in MVC3 RC
Nov 14, 2010 08:10 PM|LINK
The views will often be named the same regardless of view engine right (Index, Create, Details etc.)?
The problem was not that I had Index.aspx and Index.cshtml in the same view folder. I understand that it will pick Index.aspx first if I would do that. The problem was that I had Index.cshtml in an Area view folder and Index.aspx in the root view folder and MVC picks Index.aspx from the root even though the controller with return View("Index") was in the area.
If you do return View("Index") in /Areas/Admin/Controllers/HomeController.cs wouldn't it be more logical and intuitive if it used /Areas/Admin/Views/Home/Index.cshtml rather than /Views/Home/Index.aspx?
Sorry if I'm nagging, I'm just surprised that I'm the only one that thinks this is weird:)
</div>