step1: 添加下列代码到ASPX页面:
<IFRAME id="frame1" src="SourcePage.extension / URL of the external Site" scrolling="auto" runat=server>
</IFRAME>
step2
此时aspx.cs中会有:
protected System.Web.UI.HtmlControls.HtmlGenericControl frame1;
添加下列行到page_load事件中:
HtmlControl frame1 = (HtmlControl)this.FindControl("frame1");
step3
在需要动态变更页面的地方添加:
frame1.Attributes["src"] = http://yourserver;
当然你还可以动态改变frame的大小:
frame1.Attributes["width"] = "100%";
frame1.Attributes["height"] = "328px";