MVC3下的layout页面
1.Layout页基础:
如果你有使用MasterPage的经验,你将会记得如下的几个东西
A:<%@ Master %>
B:<%@ Page %>
C:<asp:ContentPlaceHolder />
D:<asp:Content />
但是在Layout中,以上的这些东西将会消失.(作者不排除有WebPages和WebForms兼容工作的可能性)
取而代之的新功能是:
A.Layout属性:等同于原来的MasterPageFile属性.
B.@RenderBody()方法:直接渲染整个View到占位符处,而不需要原来所使用的<asp:Content />.
C.@RenderPage()方法:渲染指定的页面到占位符处.
D.@RenderSection方法:声明一个占位符,和原来的<asp:ContentPlaceHolder />功能类似.
E.@section标记:对@RenderSection方法声明的占位符进行实现,和原来的<asp:Content />功能类似.
2.实践:
Layout页面作用类似于之前WebForm模板页(MasterPage)的作用,起到页面重用、统一界面风格的作用。
首先,我们新建一个MVC3项目,_Layout.cshtm自动生成,l默认位于Web/Views/Shared/。新建个_MyLayout.cshtml.
如果有页面想套用公用的模板页,只需在页面的开头写@Layout = filePath;即可,如页面Index.cshtml
@{
//Layout = null;
Layout = "~/Views/Shared/_MyLayout.cshtml";
}
@{
ViewBag.Title = "Home Page";
} <h2>@ViewBag.Message</h2>
<p>
To learn more about ASP.NET MVC visit
<a href="http://asp.net/mvc" title="ASP.NET MVC Website">http://asp.net/mvc</a>.
</p>
假设公用模板页的内容为:
<!DOCTYPE html> <html>
<head>
<title>@ViewBag.Title</title>
</head>
<body>
这是_MyLayout........
<div>
开始呈现调用本模板页的页面原始内容。。。<br />
@RenderBody()
<br />
结束呈现调用本模板页的页面原始内容。。。<br />
</div>
再随便写写~~ @* @RenderBody();错误,一页智能呈现一次 *@
<div>
@*RenderPage()可以呈现多次*@
@RenderPage("~/Views/Shared/Error.cshtml")
@RenderPage("~/Views/Shared/Error.cshtml")
</div>
</body>
</html>
显示的结果如下:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAvUAAAGTCAIAAAAnZXoAAAAgAElEQVR4nO3daZBdx3XY8WtHVbHLVUqVU/EX50PK+ZRKqvTBlao4UeJ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791tnaadwWPBfCwSTLWOqMIZRc5eJ3ZKQEPc1FYOAAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEBvqGwAAEJv/D5eEu624aTFYAAAAAElFTkSuQmCC" alt="" />
1.如果在首页上不写明@Layout = filePath;
则MVC3自动在本文件夹下寻找_ViewStart.cshtml(里面定义了默认的模板页),使用_ViewStart.cshtml里的模板页设置。如果在本文件夹下找不到,则到上层文件夹下寻找,直到找到_ViewStart.cshtml后使用。如果最终没有找到_ViewStart.cshtml,那么当然,就不用模板页啦!
2.如果在首页上写明@Layout = null;则该页面没有模板页。
链接:http://www.cnblogs.com/highend/archive/2011/04/18/asp_net_mvc3_layout.html(推荐,有图有真相)
MVC3下的layout页面的更多相关文章
- 七天学会ASP.NET MVC (五)——Layout页面使用和用户角色管理
系列文章 七天学会ASP.NET MVC (一)——深入理解ASP.NET MVC 七天学会ASP.NET MVC (二)——ASP.NET MVC 数据传递 七天学会ASP.NET MVC (三)— ...
- 七天学会ASP.NET MVC (五)——Layout页面使用和用户角色管理 【转】
http://www.cnblogs.com/powertoolsteam/p/MVC_five.html 系列文章 七天学会ASP.NET MVC (一)——深入理解ASP.NET MVC 七天学会 ...
- 待实践二:MVC3下的3种验证 (1)前台 jquery validate验证 (2)MVC实体验证 (3)EF生成的/自己手写的 自定义实体校验(伙伴类+元素据共享)
MVC3下的3种验证 (1):前台Jquery Validate脚本验证 引入脚本 <script src="../js/jquery.js" type="text ...
- selenium下拉到页面最底端
selenium操控浏览器下拉到页面最底端: #!/usr/bin/env python # -*- coding: utf-8 -*- from selenium import webdriver ...
- 从输入URL按下回车到页面展现,中间发生了什么?
从输入URL按下回车到页面展现,总的来说发生了一下几个过程: DNS 解析:将域名解析成 IP 地址 TCP 连接:TCP 三次握手 发送 HTTP 请求 服务器处理请求并返回 HTTP 报文 浏览器 ...
- 访问WEB-INF下的jsp页面
访问web-inf下的jsp文件, 1)使用springMVC,一般都会使用springMVC的视图解析器,大概会这样配置 <!--jsp视图解析器--> <bean class ...
- SharePoint _layouts下自定义程序页面权限管理
在sharepoint中,_layouts下的自定义页面没有特别的权限,只要用户能访问sharepoint站点就可以访问_layouts下的自定义程序页面,现在我们需要给自定义页面做一下权限认证.要求 ...
- 066——VUE中vue-router之rewrite模式下配置404页面
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 使用jquery结合ajax做下拉刷新页面,上拉加载页面,俗称分页
jquery结合iscroll.js做下拉刷新页面,上拉加载页面 先上代码,里面都有注释这就不一一说明了 <!DOCTYPE html> <html lang="en&qu ...
随机推荐
- Linux常用命令_(系统管理)
用户管理:useradd.passwd.userdel用户组管理:groupadd.groupdel.gpasswd系统信息:uname.who.whoami.id登录注销:login.logout. ...
- jmeter断言
响应断言:检查的内容,如果是变量,设置为变量 断言结果:断言的结果 断言持续时间:请求事件不能超过设置的断言持续时间 Size Assertion:断言字节大小
- nodeAPI--FS
fs是唯一一个同时提供同步和异步API的模块: 读取文件夹文件名,数组形式返回: var fs = require('fs'); //async fs.readdir('./',function(er ...
- SCU3312 Stockholm Knights(最大流)
题目大概说一个n×m的格子中,'.'代表空地,'#'代表障碍,'K'代表骑士,'D'代表目的地.骑士每走一步花一条,每一步可以往(+2,+3)(-2,+3)...八个方向走,问占领所有目的地最少要几天 ...
- BZOJ4296 : [PA2015]Mistrzostwa
先不断将度数小于D的点都删去,再找到剩下的图里最大的连通块即可. #include<cstdio> #include<algorithm> #define N 200010 i ...
- jquery 获取input radio/checkbox 的值 【注意写法】
今天,在用jquery获取页面上radio值的时候,radio给出了默认值,但是无论如何修改值,radio始终是默认值,去掉默认值的时候,页面上又报出了undefined的错误.经过几番搜索,发现不同 ...
- JAVA发送邮件工具类
import java.util.Date;import java.util.Properties; import javax.mail.BodyPart;import javax.mail.Mess ...
- 关于iOS测试机个数上限的详细规则
关于iOS测试机个数上限的详细规则 前言 公司的iOS测试机快达到苹果规定的100个上限了,而因为the new iPad新出,我们需要新的quota来测试新iPad,所以就仔细研究了一下苹果关于10 ...
- MatLab GUI Load .mat File 导入mat文件
在MatLab中,我们用GUI时,有时候需要导入mat格式的图片,但是在GUI中调用load和在命令行里调用load不一样,在命令行里调用load('im.mat'),加载进去是uint8的矩阵,但是 ...
- python 面向对象的三大特征之 封装
封装:私有化 class Person(object): def __init__(self): self.__gender = "man" #在类的属性名称前面加__ self. ...