473,763 Members | 8,980 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 ControlContaine r.aspx -->
contains TestControl.asc x.

TestControl.asc x declares a public static event called TestEvent

public static event System.EventHan dler TestEvent;

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

TestControl.Tes tEvent += new System.EventHan dler(this.TestE vent_Fired);

TestEvent_Fired is nothing more then this.

private void TestEvent_Fired (object source, System.EventArg s 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***********@s bcglobal.net
Nov 18 '05 #1
0 1052

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

Similar topics

3
4426
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 I'll simplify it. Say I have made my own UserControl and I have an event for it. Someone uses my control. In fact he makes a control array of it. When an event is fired, how do you tell for which instance of the control. Could someone give me an...
7
2691
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 being registered. Is there anything else obvious or otherwise that I've missed? Is there a problem using it in a UserControl? Thanks Colin
0
895
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 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.
1
1530
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 the usercontrol is changing. thanks and i hope you anderstood what am i asking.. Lin.
5
1737
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 control so the form containing the user control can see the events you want them to see. Help Please....
1
1932
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 something like the following in my user control: public delegate void _departmentClick (object sender, int e); public event _departmentClick DepartmentClick; And then called the DepartmentClick event when I wanted to inform the parent
4
2013
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 mouse leaves it. The problem is, when the mouse passes in a contained control, the UserControl raises a MouseLeave and the border is restored back, although the mouse, for the customer, is yet inside the UserControl.
2
1824
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 place, but I cant seem to get it to work. Here is what I have:
7
2872
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 in the label. I tried by raising events as used in Winforms but it is not as easy as
0
9564
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9387
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10002
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9938
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7368
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6643
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2794
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.