473,396 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

user control event bubbling not working

Tom
hi guys I have a problem a event bubble that isn't working.

isn't working= I've opened up a handle in my user control but when I try to
use it ie.
ok I am trying to assign an event handler from Form1 to a user control's
event that I had previously made available.. but something's not right.
after the code is ran. The control does not see the BubbleClick event that
is assigned

bubblecontrol = new eventbubble();

this.bubblecontrol.BubbleClick += new EventHandler(form_bubleclick);

anyone know why ?

I've attached source code to
my user control
http://211.30.133.94:8000/WebApplica...ventbubble.txt
my form
http://211.30.133.94:8000/WebApplica...t/webform2.txt

thanks alot guys
Tom
Nov 16 '05 #1
2 2286
Tom:

Remove this line from your aspx page:

bubblecontrol = new eventbubble();

You don't need to create a new control, ASP.NET will instantiate the
control and assign a reference to the bubblecontrol field for you. The
above will overwrite what ASP.NET does, and wires up an event to a
user control that does not render to the client.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sat, 13 Nov 2004 20:13:27 +1100, "Tom"
<to********@optushome.com.au> wrote:
hi guys I have a problem a event bubble that isn't working.

isn't working= I've opened up a handle in my user control but when I try to
use it ie.
ok I am trying to assign an event handler from Form1 to a user control's
event that I had previously made available.. but something's not right.
after the code is ran. The control does not see the BubbleClick event that
is assigned

bubblecontrol = new eventbubble();

this.bubblecontrol.BubbleClick += new EventHandler(form_bubleclick);

anyone know why ?

I've attached source code to
my user control
http://211.30.133.94:8000/WebApplica...ventbubble.txt
my form
http://211.30.133.94:8000/WebApplica...t/webform2.txt

thanks alot guys
Tom


Nov 16 '05 #2
Tom
thats not the problem...

if I don't initialise it I can't assign the event

it will throw null exception

Tom

"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:0e********************************@4ax.com...
Tom:

Remove this line from your aspx page:

bubblecontrol = new eventbubble();

You don't need to create a new control, ASP.NET will instantiate the
control and assign a reference to the bubblecontrol field for you. The
above will overwrite what ASP.NET does, and wires up an event to a
user control that does not render to the client.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sat, 13 Nov 2004 20:13:27 +1100, "Tom"
<to********@optushome.com.au> wrote:
hi guys I have a problem a event bubble that isn't working.

isn't working= I've opened up a handle in my user control but when I try touse it ie.
ok I am trying to assign an event handler from Form1 to a user control's
event that I had previously made available.. but something's not right.
after the code is ran. The control does not see the BubbleClick event thatis assigned

bubblecontrol = new eventbubble();

this.bubblecontrol.BubbleClick += new EventHandler(form_bubleclick);

anyone know why ?

I've attached source code to
my user control
http://211.30.133.94:8000/WebApplica...ventbubble.txt
my form
http://211.30.133.94:8000/WebApplica...t/webform2.txt

thanks alot guys
Tom

Nov 16 '05 #3

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

Similar topics

5
by: Mark Szlazak | last post by:
Apparently there is a textarea onscroll event bubbling bug in Firefox and Mozilla: https://bugzilla.mozilla.org/show_bug.cgi?id=229089 I'm trying to check for this bug with the following...
7
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...
4
by: Josh Harris | last post by:
Here is my question: It is common to have many pieces of business logic encapsulated within asp.net user controls. This can be found in high visibility projects such as the iBuySpy portal from...
0
by: Dan Sikorsky | last post by:
How do you act on a user control's (.ascx) button click event in the containing page (.aspx) ? Should event bubbling be considered? Does this even make sense to try and do? Should the user...
17
by: dan_williams | last post by:
I have the following test web page:- <html> <head><title>Test</title> <script language="Javascript"> <!-- function fnTR() { alert("TR"); }
5
by: Nick Gilbert | last post by:
Hi, I'm using the asp:Wizard control and on some of the steps, I would only like the user to be able to progess to the next step by clicking an image button. Therefore I would like to be able to...
0
by: Ben Crinion | last post by:
Hi Im having a bit of a problem with an exception that doesnt seem to be bubbling up from a user control to its containing user control. The exception can occur on an event fired by a user...
0
by: =?Utf-8?B?TWFyayBHaWxrZXM=?= | last post by:
I have designed and written a custom menu like server control. The control inherits from DataBoundControl and implements INamingContainer and IPostBackEventHandler interfaces. The control uses only...
1
by: NKaufman | last post by:
In my pageload I am adding multiple instances of same User control. They all have properties ID and ParentID. Now I also have a button in each User control and am bubbling the event back to main...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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
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,...

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.