1. frameset.aspx:<%@ Page language="c#" src="frameset.cs" Inherits="MyCodeBehind" %>
<frameset id="myframe" runat="server">
</frameset>2. frameset.cs:
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;public class MyCodeBehind : Page
{
protected HtmlGenericControl myframe;
protected override void OnLoad( EventArgs e)
{
base.OnLoad(e);
myframe.Attributes["rows"] = "300,*";
HtmlGenericControl hgc = new HtmlGenericControl("FRAME");
hgc.Attributes["name"] ="nav";
hgc.Attributes["src"] = "http://www.csdn.net";
myframe.Controls.Add(hgc);
hgc = new HtmlGenericControl("FRAME");
hgc.Attributes["name"] ="main";
hgc.Attributes["src"] = "http://www.microsoft.com/china";
myframe.Controls.Add(hgc); }
}
<frameset id="myframe" runat="server">
</frameset>2. frameset.cs:
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;public class MyCodeBehind : Page
{
protected HtmlGenericControl myframe;
protected override void OnLoad( EventArgs e)
{
base.OnLoad(e);
myframe.Attributes["rows"] = "300,*";
HtmlGenericControl hgc = new HtmlGenericControl("FRAME");
hgc.Attributes["name"] ="nav";
hgc.Attributes["src"] = "http://www.csdn.net";
myframe.Controls.Add(hgc);
hgc = new HtmlGenericControl("FRAME");
hgc.Attributes["name"] ="main";
hgc.Attributes["src"] = "http://www.microsoft.com/china";
myframe.Controls.Add(hgc); }
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货