开发者

MVC call Html.Action within area?

I have an AREA called "Admin"

It uses the same layout page as the rest of my site. In the layout page I have

 @Html.Action("MyMethod", "MyController", null) 

MyController is not in the Admin area but at the root/controllers folder when I go to any page in side the AREA I get the following execption

"The controller for path '/adm开发者_如何学JAVAin/home' was not found or does not implement IController"


Try like this:

@Html.Action("MyMethod", "MyController", new { area = "" }) 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜