下面是框架页:
 <%@ Page CodeBehind="Frameset.aspx.cs" Language="c#" AutoEventWireup="false" Inherits="IbatisTest.Web.Frameset" %>
<%@ Page CodeBehind="Frameset.aspx.cs" Language="c#" AutoEventWireup="false" Inherits="IbatisTest.Web.Frameset" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"> <HTML>
<HTML> <HEAD>
    <HEAD> <TITLE>内容框架集</TITLE>
        <TITLE>内容框架集</TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
        <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312"> <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
        <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1"> <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
        <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema"> </HEAD>
    </HEAD> <frameset cols="150,*" id="detail" runat="server">
    <frameset cols="150,*" id="detail" runat="server"> <frame name="contents" id="contents" runat=server src=""></frame>
        <frame name="contents" id="contents" runat=server src=""></frame> <frame name="main" id="main" src="" runat="server"></frame>
        <frame name="main" id="main" src="" runat="server"></frame> <noframes>
        <noframes> <p id="p1">
            <p id="p1"> 此 HTML 框架集显示多个 Web 页。若要查看此框架集,请使用支持 HTML 4.0 及更高版本的 Web 浏览器。
                此 HTML 框架集显示多个 Web 页。若要查看此框架集,请使用支持 HTML 4.0 及更高版本的 Web 浏览器。 </p>
            </p> </noframes>
        </noframes> </frameset>
    </frameset> </HTML>
</HTML>后置代码如下:
 using System.Data;
using System.Data; using System.Drawing;
using System.Drawing; using System.Web;
using System.Web; using System.Web.SessionState;
using System.Web.SessionState; using System.Web.UI;
using System.Web.UI; using System.Web.UI.WebControls;
using System.Web.UI.WebControls; using System.Web.UI.HtmlControls;
using System.Web.UI.HtmlControls;
 namespace IbatisTest.Web
namespace IbatisTest.Web {
{ /// <summary>
    /// <summary> /// Frameset 的摘要说明。
    /// Frameset 的摘要说明。 /// </summary>
    /// </summary> public class Frameset : System.Web.UI.Page
    public class Frameset : System.Web.UI.Page {
    { protected System.Web.UI.HtmlControls.HtmlGenericControl detail;
        protected System.Web.UI.HtmlControls.HtmlGenericControl detail; protected System.Web.UI.HtmlControls.HtmlGenericControl contents;
        protected System.Web.UI.HtmlControls.HtmlGenericControl contents; protected System.Web.UI.HtmlControls.HtmlGenericControl main;
        protected System.Web.UI.HtmlControls.HtmlGenericControl main; 
     private void Page_Load(object sender, System.EventArgs e)
        private void Page_Load(object sender, System.EventArgs e) {
        { detail.Attributes.Add("src","default.aspx");
            detail.Attributes.Add("src","default.aspx"); detail.Attributes.Add("framespacing", "0") ;
            detail.Attributes.Add("framespacing", "0") ; detail.Attributes.Add("frameborder", "0") ;
            detail.Attributes.Add("frameborder", "0") ; detail.Attributes.Add("marginwidth", "0") ;
            detail.Attributes.Add("marginwidth", "0") ; detail.Attributes.Add("marginheight", "0") ;
            detail.Attributes.Add("marginheight", "0") ; detail.Attributes.Add("topmargin", "0") ;
            detail.Attributes.Add("topmargin", "0") ; detail.Attributes.Add("leftmargin", "0") ;
            detail.Attributes.Add("leftmargin", "0") ;
 contents.Attributes.Add("NAME", "hauttop") ;
            contents.Attributes.Add("NAME", "hauttop") ; contents.Attributes.Add("MARGINHEIGHT", "0") ;
            contents.Attributes.Add("MARGINHEIGHT", "0") ; contents.Attributes.Add("MARGINWIDTH", "0") ;
            contents.Attributes.Add("MARGINWIDTH", "0") ; contents.Attributes.Add("topmargin", "0") ;
            contents.Attributes.Add("topmargin", "0") ; contents.Attributes.Add("leftmargin", "0") ;
            contents.Attributes.Add("leftmargin", "0") ; contents.Attributes.Add("SCROLLING", "no") ;
            contents.Attributes.Add("SCROLLING", "no") ; contents.Attributes.Add("framespacing", "0") ;
            contents.Attributes.Add("framespacing", "0") ; contents.Attributes.Add("frameborder", "0") ;
            contents.Attributes.Add("frameborder", "0") ;
 contents.Attributes.Add("src","default.aspx");
            contents.Attributes.Add("src","default.aspx"); main.Attributes.Add("NAME", "corpscentre") ;
            main.Attributes.Add("NAME", "corpscentre") ; main.Attributes.Add("MARGINHEIGHT", "0") ;
            main.Attributes.Add("MARGINHEIGHT", "0") ; main.Attributes.Add("MARGINWIDTH", "0") ;
            main.Attributes.Add("MARGINWIDTH", "0") ; main.Attributes.Add("frameborder", "1") ;
            main.Attributes.Add("frameborder", "1") ; main.Attributes.Add("SCROLLING", "auto") ;
            main.Attributes.Add("SCROLLING", "auto") ; main.Attributes.Add("framespacing", "0") ;
            main.Attributes.Add("framespacing", "0") ; main.Attributes.Add("topmargin", "1") ;
            main.Attributes.Add("topmargin", "1") ; main.Attributes.Add("leftmargin", "0") ;
            main.Attributes.Add("leftmargin", "0") ;
 main.Attributes.Add("src","Person.aspx");
            main.Attributes.Add("src","Person.aspx"); }
        }
 Web 窗体设计器生成的代码
        Web 窗体设计器生成的代码 }
    } }
}
原文:http://www.cnblogs.com/zhangyuhang3/p/6906051.html