如何使用母版页进入asp.net mvc 3? [英] how to use master page into asp.net mvc 3?
本文介绍了如何使用母版页进入asp.net mvc 3?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是asp.net mvc的新手,现在我想在mvc 3中创建一个Web应用程序,其中包含所有视图的常见外观(如asp.net webform页面),因此我们可以使用母版页来进行常见查看并感觉到mvc 3是什么方式提供共同的外观和感觉或hedeer和footer所有视图到我们的应用程序。所以请帮助我将主页面设施添加到mvc3或其他主页的替代版本到asp.net mvc3 web应用程序。
i m new to asp.net mvc and now i want to create an web application into mvc 3 which contain an common look and feel for all view(like asp.net webform pages) so there we can use master page for common look and feel but into mvc 3 what is the way to provide common look and feel or hedeer and footer to all view into our application . so kindly help me to add master page facility into mvc3 or other alternative of master page into asp.net mvc3 web application.
推荐答案
在MVC术语中,它被称为布局
页面。
阅读本文了解更多信息:
http://www.w3schools.com/aspnet/mvc_layout.asp [ ^ ]
ASP.NET MVC 4 - Razor中的布局和部分 [ ^ ]
https://www.youtube.com/watch?v=1DJ2GaUj97g [ ^ ]
创建布局页面后,不要忘记在其中添加RenderBody()
方法。它用于呈现内容页面。
-KR
In MVC terminology, it is called asLayout
page.
Read this for more info:
http://www.w3schools.com/aspnet/mvc_layout.asp[^]
ASP.NET MVC 4 - Layout and Section in Razor[^]
https://www.youtube.com/watch?v=1DJ2GaUj97g[^]
After creating the Layout page, don't forget to add theRenderBody()
method in it. It is used to render the content page.
-KR
这篇关于如何使用母版页进入asp.net mvc 3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文