11th
05.08
Net之旅:Master页面 和 Content页面
说到 Master 和 Content 页面不知有多少人用过CMS(网站管理系统)。
其Cms工作表现形式:在首页模板中插入标签 {$歌特中国}; {$歌特中国} 标签内容为”歌特中国Web技术交流站”
查看网站首页。{$歌特中国} 标签的位置显示的为 “首页 简介。。。。”
也可在页面中插入更多标签。被插入标签的位置在浏览时会显示标签内容。
现回过头一说 Master 和 Content 页面。
Master 即母页(与上面所说Cms中的模板类似)
代码表现形式:
- <%@ Master Language="C#" Debug="true" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <script runat="server">
- </script>
- <html xmlns="http://www.w3.org/1999/xhtml" >
- <head runat="server">
- <title>Wrox United</title>
- <link href="site.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <form id="MainForm" runat="server">
- <div>
- <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
- </asp:contentplaceholder>
- </div>
- </form>
- </body>
- </html>
Name: Cngothic 












