I'm trying to set the HTML of an Iframe at runtime, from code behind.
In my aspx page i have:
<asp:Button ID="btnChange" runat="server" Text="Change iframe content"
onclick="btnChange_Click" />
<br />
<iframe id="myIframe" runat="server" />
in the code behind:
protected void btnChange_Click(object sender, EventArgs e)
{
myIframe.InnerHtml = "<h1>Contents Changed</h1>";
}
When i run this.... it posts back, but doesn't change the myIframe contents at all... What am i doing wrong??