473,513 Members | 2,624 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1028

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4415
by: The Mess | last post by:
I am working in VB5. How do you mimmick Visual Basic's putting an Index argument at the front of the variables passed to an event when making your own control? This sounds kind of confusing so...
7
2675
by: Colin Young | last post by:
I have a UserControl that contains a calendar control. The calendar is not raising events (month navigation, date selections, etc.). I've checked that the OnSelectionChanged event has a handler...
0
886
by: Jeremy Howard | last post by:
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...
1
1520
by: Lin | last post by:
Hi All, I have a UserControl and in the UserControl I have a few controls (textbox buttons ect.) and I want to know how can I fire the "onchange" event (of the usercontrol) when the textbox in...
5
1712
by: snesbit | last post by:
If a screen is made up of several user controls and those user controls contain various packaged or standard controls such as a grid, how do you raise both standard and custom events from the user...
1
1918
by: Jimi | last post by:
Hi all, I have a user control which I want to raise a custom event from so the parent page can reload a datagrid with some new information. In the 1.1 framework days I would have just done...
4
1999
by: ronchese | last post by:
Hello! I have a UserControl that have two other controls inside it. I need to set a different border color for my UserControl when the mouse enters it, and restore the border color when the...
2
1809
by: RSH | last post by:
Hi, I have been trying to follow a tutorial on raising an event from a user control and then handling it in the parent page. The article is a little vague so I believe I have the code in...
7
2861
by: Christian Cambier | last post by:
Hi, I have a textbox in a web user control. I then add the usercontrol to a web form. I also add a label in the web form. Now, when I press a key in the textbox, i want to display some text...
0
7259
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7158
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7380
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7523
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5683
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5085
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.