468,780 Members | 2,268 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Raising an Event from a UserControl contained in an IFRAME?

Hello everyone,

Does anyone know if it is possible to raise an event from a user control
contained within an IFRAME and then recieve that event back on the page that
contains the IFRAME? Below is an outline of what I have right now but for
some reason the page containing the iframe never updates the textbox that is
assigned text in the event handler.

MainPage.aspx --> contains an IFRAME --> contains ControlContainer.aspx -->
contains TestControl.ascx.

TestControl.ascx declares a public static event called TestEvent

public static event System.EventHandler TestEvent;

MainPage.aspx adds a hander for the TestControl event "TestEvent"

TestControl.TestEvent += new System.EventHandler(this.TestEvent_Fired);

TestEvent_Fired is nothing more then this.

private void TestEvent_Fired(object source, System.EventArgs e)
{
TextBox1.Text = "Hello";
}
Everything compiles fine and the code runs fine. I can break the code on
TestEvent_Fired and I see that it gets called and the literal "Hello" gets
assigned to TextBox1. The problem though is that from the GUI, TextBox1
never gets updated. The funny thing is I can see in my locals window that
TextBox1 actually contains "Hello", but the screen is never updated with
that data no matter what I do.

Any help on this would be appreciated. Thank you for your time.

Jeremy
je***********@sbcglobal.net
Nov 18 '05 #1
0 873

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Colin Young | last post: by
1 post views Thread by Lin | last post: by
7 posts views Thread by Christian Cambier | last post: by
1 post views Thread by CARIGAR | last post: by
2 posts views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.