Net之旅:Master页面 和 Content页面
说到 Master 和 Content 页面不知有多少人用过CMS(网站管理系统)。
其Cms工作表现形式:在首页模板中插入标签 {$歌特中国}; {$歌特中国} 标签内容为”歌特中国Web技术交流站”
查看网站首页。{$歌特中国} 标签的位置显示的为 “首页 简介。。。。”
也可在页面中插入更多标签。被插入标签的位置在浏览时会显示标签内容。
现回过头一说 Master 和 Content 页面。
Master 即母页(与上面所说Cms中的模板类似)
代码表现形式:

  1. <%@ Master Language="C#" Debug="true" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <script runat="server">
  4. </script>
  5. <html xmlns="http://www.w3.org/1999/xhtml" >
  6. <head runat="server">
  7.     <title>Wrox United</title>
  8.     <link href="site.css" rel="stylesheet" type="text/css" />
  9. </head>
  10. <body>
  11.     <form id="MainForm" runat="server">
  12.     <div>
  13.         <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
  14.         </asp:contentplaceholder>
  15.     </div>
  16.     </form>
  17. </body>
  18. </html>

Read the rest of this entry »

, , , ,