473,549 Members | 2,670 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Event handlers keep getting unregistered

For some reason (and I wish I could say specifically
when) studio.net keeps dis-associating my event handlers
with their events. In a recent frsutrating example, my
(C#) page_load routine wasn't getting called. I used the
gui in VS.net to associate the routine with the Load
event, but then the code for one of my buttons wasn't
running. When I re-associated the OnClick routine,
vs.net deleted the page_load connection. The routine
itself isn't deleted, but the line in InitializeCompo nent:

this.Load += new System.EventHan dler(this.Page_ Load);

just keeps getting deleted.

Help!

Nov 17 '05 #1
0 1095

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

Similar topics

8
3117
by: Dennis C. Drumm | last post by:
I have a class derived from a SortedList called SystemList that contains a list of objects indexed with a string value. The definition of the objects contained in the SortedList have a boolean field and an event that is fired if the boolean field value changes. The derived SortedList class has an override for the Add method. The Add...
3
1541
by: cs | last post by:
I have an object X, and an object Y. Y is the only object that has a reference to X. X has an event. Objects A, B, C register for this event but dont keep a reference to object X. When whoever owns Y is done with it, and Y is garbag collected, what happens to X and to the Objects that registered for the event? will those event registration...
0
1254
by: Flack | last post by:
Hello, I encountered a strange problem and I do not know what is causing it. I created an empty form, added a tabs control to it and set the tab control dock style to fill. Then I added three tabpages to it. To the first tab page I added three buttons. The first button's click handler would set the tab control's tab alignment to...
0
1655
by: R Reyes | last post by:
Hi. I'm trying to make some event handlers for buttons that are nested within datalists, however I keep getting errors trying to access them and a blank page shows w/o any real error message. How can I access these nested controls correctly? For some reason I always have to use a foreach loop to search for a control within a control. ...
3
1609
by: Peter Oliphant | last post by:
In general, some controls can have events handlers attached to them, typically via the += operator. How does one remove an event handler added this way? Or, just as good for my purposes, how can one remove all event handlers attached?
5
1555
by: Charles Law | last post by:
I think I asked the wrong question last time, so I am starting a separate post to distinguish them. Take five classes: ClassA and ClassW...Z ClassA raises five events: Event1...5 ClassW...Z handle some combination of these events. For example ClassW handles Event1, 2 and 5
0
1099
by: Michael Maercker | last post by:
Hi! I'm about to go nuts over my serializing problem. This is my situation: I have a Data-Class that can have children of the same class which are stored in a hashtable, i.e: X has A as a child A has B as a child When an object is changed it raises an Updated-Event which the
9
14427
by: Marcelo Cabrera | last post by:
Hi, I have a user control that in turn creates a bunch of webcontrols dynamically and handles the events these webcontrols raise. It used to work fine on ASP .Net 1.1 but when compiled on 2.0 it does not. The problem is that the webcontrols get created on the OnLoad event of the usercontrol and the event handlers are assigned at the same...
0
722
by: ross | last post by:
Hi All, I have a parent class in which I keep several buttons and their event handlers. Once I upgraded to 2.0 the event handlers stopped getting fired. In the aspx page I am getting the warning that my buttons are already defined; however, I don't know how to prevent the <asp:Button> tag from creating a whole new button variable. Any...
0
7451
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...
0
7720
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7810
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5369
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...
0
5088
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...
0
3501
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...
0
3483
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1944
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
0
764
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...

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.