Tuesday, November 4, 2008

ASP.NET Frames

1. place your iframe tag where your want in body tag for eg

iframe id="frame1" style="HEIGHT: 150px" border="0" name="frame1" align="middle" frameBorder="no" width="100%" scrolling="no" runat="server"


2. Now, declare one Htmlgeneric control like this

protected System.Web.UI.HtmlControls.HtmlGenericControl frame1;


3. At last ....

HtmlControl frame1 = (HtmlControl)this.FindControl("frame1");
frame1.Attributes["src"] ="target.aspx".ToString ();


write this in your application page load function.........

No comments: