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
).
精彩评论