查看()主场迎战PartialView() [英] View() vs. PartialView()

查看:125
本文介绍了查看()主场迎战PartialView()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

查看()方法可以加载部分景色。

The View() method can load Partial Views.

之间查看 PartialView()查看差()( )可以加载视图和局部视图和 PartialView()只能装载部分的看法?

Is the difference between View() and PartialView() is that View() can load views and partial views and PartialView() can only load partial views?

推荐答案

这是给一个视图引擎,以决定是否要治疗从常规视图不同部分景色。

It's up to a view engine to decide if they want to treat partial views different from regular views.

例如,在WebFormViewEngine没有差别。

For example, in the WebFormViewEngine there is no difference.

在新的ASP.NET MVC 3 RazorViewEngine存在一定的差异。只有常规视图将有_viewstart.cshtml网页上,因为他们是为了的东西,如设置布局页。

In the new ASP.NET MVC 3 RazorViewEngine there are some differences. Only regular views will have the "_viewstart.cshtml" pages run because they are meant for things such as setting up layout pages.

这篇关于查看()主场迎战PartialView()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆