ASP.NET 2.0 Question:
I have a simple IFrame User Control that I wrote:
HTML:
<%@ Control Language="C#" AutoEventWireup="true"
CodeFile="IFrameControl.ascx.cs" Inherits="IFrameControl" %>
<iframe src="" id="taskwindow" runat="server" width="100%"
height="100%"></iframe>
CODE BEHIND PAGE:
private void Page_Load(object sender, System.EventArgs e)
{
taskwindow.Attributes["src"] = "http://hotmail.com";
}
As you can see I set the src attribute of the IFrame on the page_load
event of the control. I am doing it that way because later I am going
to expose the src and let the page containing this IFrame modify it.
My Problem:
I can drop this control into a normal webform and it works perfectly.
However, when I drop this control into the ContentPlaceHolder of a form
which uses my Master.page, the control will NOT load its src.
I can see the webform downloading data from the src(in this case
hotmail) in the status bar at the bottom of my browser, but the IFrame
just stays blank and I don't see the hotmail site.
Anyone know how to fix this so that I can use my IFrame within my
ContentPlaceHolder?
Thanks,
Brent