类名 |
简介 |
Content |
This control contains the content for a particular region 此控件包含的内容是一个详细的Region对象。 |
ContentContainer |
This control serves two distincts purposes: - it marks the location where the Master Page will be inserted into the Page - it contains the various Content sections that will be matched to the Master Page's Region controls (based on their ID's). 此控件提供两个不同的功能: |
NoBugForm |
A server form that does not cause a problem by being inside a master page or other naming container. 服务端表单没有引起问题从Master Page引入端或者其它的名称容器(Container) |
Region |
The control marks a place holder for content in a master page. 此控件标记一个在Master Page的区域的内容。 |
例子:
Default.aspx
<%@ Page Language="C#" %> <mp:contentcontainer runat="server" id="MPContainer" MasterPageFile="~/Master.ascx"> |
Master.ascx
<%@ Register TagPrefix="mp" Namespace="MetaBuilders.WebControls.MasterPages" Assembly="MetaBuilders.WebControls.MasterPages" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
用法:
Master.ascx为框板用户控件。在其中使用region标记出以后需要嵌入内容的位置。
Default.aspx中使用contentcontainer得到模板,使用content与Master.ascx中的region标记为配套引用。