J
Jeremy Howard
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
(e-mail address removed)
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
(e-mail address removed)