471,046 Members | 1,046 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,046 software developers and data experts.

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.

Nov 18 '05 #1
0 934

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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.