码迷,mamicode.com
首页 > Web开发 > 详细

002-MVC布局页

时间:2017-03-25 15:19:10      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:har   tab   htm   port   ble   show   pre   meta   erb   

~/Views/Shared/_LayoutPage1.cshtml

 1 <!DOCTYPE html>
 2 <html>
 3 <head>
 4     <meta name="viewport" content="width=device-width" />
 5     <title>@ViewBag.Title</title>
 6     @RenderSection("head", true)
 7 </head>
 8 <body>
 9     <div>
10         布局页面
11         @RenderBody()
12     </div>
13 </body>
14 </html>

~/Views/AjaxDemo/Show.cshtml

 1 @{
 2     ViewBag.Title = "Show";
 3     Layout = "~/Views/Shared/_LayoutPage1.cshtml";
 4 }
 5 @section head{
 6     <script type="text/javascript">
 7 
 8     </script>
 9 }
10 @using MvcApplication1.Models
11 @model MvcApplication1.Models.UserInfo
12 <h2>Show</h2>
13 <table>
14     <tr><td>Hello,World</td></tr>
15 </table>

 

002-MVC布局页

标签:har   tab   htm   port   ble   show   pre   meta   erb   

原文地址:http://www.cnblogs.com/ninghongkun/p/6617185.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!