IFrame within a ContentPlaceHolder, anyone know about this?

B

Brent.Lakatos

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top