Monday, September 21, 2009

Setting properties for iFrame from code behind

I have an iFrame in the markup. I need to set properties of the iFrame through code


<iframe src ="[Url Here]" runat="server" frameborder=0 id="iFrame">
<p>Your browser does not support iframes.</p>

//Code Behind

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

iFrame.Attributes["src"] = "[The Url]";

No comments:

Post a Comment