MVC Areas - View not found

前端 未结 8 1440
盖世英雄少女心
盖世英雄少女心 2020-12-15 08:35

I have a project that is using MVC areas. The area has the entire project in it while the main \"Views/Controllers/Models\" folders outside the Areas are empty barring a dis

相关标签:
8条回答
  • 2020-12-15 09:05

    I just had the same problem and solved it by setting the ascx's 'Build Action' property to 'Embedded Resource'.

    0 讨论(0)
  • 2020-12-15 09:08

    Solved ! A couple of my "RedirectToAction" calls were not specifying the area name explicitly in the routeobject collection parameter of that method. Weird though, that that is required even though the controllers Redirecting are all in the same area. Also, the HtmlActionLinks work fine when I don't specify the new {area="blah"} in its routeobject collection, so I wonder why the controller action calls to RedirectToAction() need that even though both the calling and the called controller actions are all within the same area.

    0 讨论(0)
提交回复
热议问题