470,571 Members | 2,375 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,571 developers. It's quick & easy.

IFrame within a ContentPlaceHolder, anyone know about this?

ASP.NET 2.0 Question:

I have a simple IFrame User Control that I wrote:

<%@ Control Language="C#" AutoEventWireup="true"
CodeFile="IFrameControl.ascx.cs" Inherits="IFrameControl" %>

<iframe src="" id="taskwindow" runat="server" width="100%"

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


Nov 19 '05 #1
0 2578

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by ukrbend | last post: by
7 posts views Thread by ukrbend | last post: by
2 posts views Thread by Andrew Robinson | last post: by
2 posts views Thread by Mike | last post: by
4 posts views Thread by =?Utf-8?B?VA==?= | last post: by
1 post views Thread by livre | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.