开发者

Master page to Layout in MVC3

I have to user master page of MVC2 application in VS 2008 in MVC3 2010. Cananyone he开发者_运维问答lp me on this


You cannot have WebForms master page (.Master file) with a Razor view (.cshtml file). If you want to use a WebForms master page you need to use a WebForms view (.aspx file). So simply put the Site.Master file in the ~/Views/Shared folder of your ASP.NET MVC 3 application and add a WebForms view implementing it (for example ~/Views/Home/Index.aspx).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜