MasterPage轻松使用三步走(VS2005的新东东MasterPage)

来源:互联网 发布:mac终端格式化硬盘 编辑:程序博客网 时间:2024/04/27 19:31

MasterPage轻松使用三步走(VS2005的新东东MasterPage)
(1)
创建母版 new -> 选择MasterPage
(2)
新建Form -> 勾选使用母版
加载母版的ASPX代码头:
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Welcome.aspx.cs" Inherits="com.thoughtchina.pms.Pages_Welcome" Title="Untitled Page" %>
(3)
母版放置内容的容器:
MasterPage.master
<asp:ContentPlaceHolder ID="cphPage" runat="server" >
                    </asp:ContentPlaceHolder>
注:内容最好为<table></table>包含,否则VS2005的的IDE预览不了图形界面. 

 

原创粉丝点击