473,799 Members | 2,934 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Losing web form event handlers in VS.Net 2003

On many occasions (but without an obvious pattern), we (it's not just me!) encounter a problem with VS.Net losing event handlers for controls, e.g. the auto-generated this.button.cli ck += new <handler stuff> gets dropped from InitializeCompo nent. The effect is that a web form that used to do something when you clicked on the button is now inert. We tried a workaround of manually setting our event handlers in a separate initialisation method but this was also errorprone as the handlers don't appear in the event property window

I'd be very grateful for any solutions or comments from fellow sufferers
Best wishes.
Nov 18 '05 #1
2 1067
Yes I get the same thing if I have nested datagrids.
I have to code all the events for all datagrids.
A
"Kevin Waite" <an*******@disc ussions.microso ft.com> wrote in message
news:F7******** *************** ***********@mic rosoft.com...
On many occasions (but without an obvious pattern), we (it's not just me!) encounter a problem with VS.Net losing event handlers for controls, e.g. the
auto-generated this.button.cli ck += new <handler stuff> gets dropped from
InitializeCompo nent. The effect is that a web form that used to do
something when you clicked on the button is now inert. We tried a
workaround of manually setting our event handlers in a separate
initialisation method but this was also errorprone as the handlers don't
appear in the event property window.
I'd be very grateful for any solutions or comments from fellow sufferers.
Best wishes.

Nov 18 '05 #2
I have also had this problem. But it has happened to me because I would move a button on my webpage and then it would lose its handles. Then all I do is click on the button again and they are back in the code.
Nov 18 '05 #3

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

Similar topics

8
3131
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 method adds an event handler for the object's event for each new item added to the list. In the...
8
2326
by: Tim Geiges | last post by:
Since I am being challenged with learning c# I figured I could pass some of the pain on to you guys :-) I have another question(this one is important for me to fix before I can get my app to Beta) My app (an image viewer) opens with a Main form with a file explorer if you open the program with the exe, but opens with the ImageView form if you double click an image file, if you want to see the Main form once the ImageView is open the...
1
1150
by: Matt Sogla | last post by:
I have written an ASP.NET app with C# code-behind. While modifying the code and testing it, I find that I will sometimes lose all event handlers on the page(SortCommand, PageIndexChanged, Load, and ItemCommand). There doesn't seem to be a pattern. Sometimes I make no changes at all and when I run the app, nothing happens because the eventhandlers are gone. Does anyone know what is going on here??? Also, when I say I am losing the...
2
972
by: Joel Barsotti | last post by:
When I switch between design veiw and html view, I loose all the event handlers in my C# file. What do I need to update to fix this?
5
5295
by: fbwhite | last post by:
I know this issue has been brought up many times, but I have tried many of the solutions to no avail. I wanted to give my specific case to see if someone could be of any help. We are using the sessionstate inproc mode and users are randomly losing their session. I do not believe it is happening across all users at one time. It seems to happen to different users at different times, but I am only going off heresay. The aspnet worker...
5
4366
by: Alain Filiatrault | last post by:
Hi, I need to implement a "form.dirty" feature on a VB .NET form not related to a database. I need to know if any of the items (Textboxes, combo, listboxes, ...) was changed. Is there a quick and easy way to do this? Thanks in advance. Alain
1
1442
by: Mian Mahboob | last post by:
hi At Runtime i add a Form in designing time panel Control. on that form i add couple of user controls. i want to comuncated each of usercontrol's on my Form which is execute on Runtime mean's i want to call diffrant Event's of each user control all work is on Windows' C# 2003
7
1718
by: Michael D. Ober | last post by:
Is there anyway to raise an event from a class and require that any program using that class (not just inheritance) have an event handler for specific events in the class? In my case, some events don't need to be handled, but some must be handled by the program that uses the class. I'm looking for something along the lines of Class MyClass Event OptionalEvent(parms) Event RequiredEvent(parms)
3
4698
by: bsturg21 | last post by:
Hello, I have a windows form that has a series of linklabels on it, and I need to have each linklabel, when clicked, open a separate windows form that has a single paramter passed into it. The form that has the System.Windows.Forms.LinkLabel controls on it is in a different project and under a different namespace from the file where the LinkLabel_LinkClicked events are, so I can't just do frm.ShowDialog under the LinkClicked method. ...
0
9688
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
9546
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,...
1
10247
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,...
0
6809
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
5467
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...
0
5593
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4146
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
2
3762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
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.