开发者

MVC RenderAction Areas and MasterPages

I have a MVC application, using areas and a masterpage. I have a single MasterPage i'd like to use in all areas placed in PRJ\Views\Shared. My master page have several RenderAction calls to actions inside a controller in my root PRG Controllers folder. Everything works great if i'm referencing the masterpage from my views folder but not for my views inside the areas. I guess it expects the controllers and actions to be inside开发者_运维技巧 the Areas!!!.

Please help-me in this one.

Thank U all.


You should be able to use

@Html....("A Link", "Action", "Controller", new { Area = "" }, null);

This will always point to an area-less controller/action

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜