By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,719 Members | 1,811 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,719 IT Pros & Developers. It's quick & easy.

Events disappear in VS.Net 2003

P: n/a
Hi,

All of our developers using C# VS.Net 2003 to develop websites are
having problems with Events being deleted from their code by Visual
Studio. It seems that object events defined in the properties window
work for a while during debugging, and after a while visual studio
decides that it doesn't like the events anymore and it cancels them
however leaves intact the associated code that is called by the event.

As far as I have been told the developers using VB.NET are not
experiencing these problems.

The only way I have found around this problem is to code the events for
webpage objects directly in the HTML.

Is anyone else experiencing this problem??? and is there a solution to
this as it is driving us NUTZ. I have found very little/next to nothing
searching in google.

Regards

Rekkie
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Rekkie wrote:
Hi,

All of our developers using C# VS.Net 2003 to develop websites are
having problems with Events being deleted from their code by Visual
Studio. It seems that object events defined in the properties window
work for a while during debugging, and after a while visual studio
decides that it doesn't like the events anymore and it cancels them
however leaves intact the associated code that is called by the event.

As far as I have been told the developers using VB.NET are not
experiencing these problems.

The only way I have found around this problem is to code the events for
webpage objects directly in the HTML.

Is anyone else experiencing this problem??? and is there a solution to
this as it is driving us NUTZ. I have found very little/next to nothing
searching in google.


THis is a known isue if I'm not mistaken. I've ran into this myself a couple
of times.

You can re-wire the event handlers in the InitializeComponent() method in
the code behind.

Frans.

--
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET Blog: http://weblogs.asp.net/fbouma
Microsoft C# MVP
Nov 16 '05 #2

P: n/a
Rekkie <r e k c u t 1 1 @ e x c it e.c om> wrote in
news:OR**************@tk2msftngp13.phx.gbl:
Hi,

All of our developers using C# VS.Net 2003 to develop websites are
having problems with Events being deleted from their code by Visual
Studio. It seems that object events defined in the properties window
work for a while during debugging, and after a while visual studio
decides that it doesn't like the events anymore and it cancels them
however leaves intact the associated code that is called by the event.

As far as I have been told the developers using VB.NET are not
experiencing these problems.

The only way I have found around this problem is to code the events
for webpage objects directly in the HTML.

Is anyone else experiencing this problem??? and is there a solution to
this as it is driving us NUTZ. I have found very little/next to
nothing searching in google.


Wow, yes, I just had a project that started doing this, for events but
also properties in my Corelab mySql add in modules. I don't know why it
happened. As you say, the code was still in the code behind files in my
web project. So.... I carefully backed up the whole sheband. Then I
created a brand new blank project, did a "Add from existing...." on
every file, and lo and behold, it fixed it. No more forgetfulness.

OH, and I'm using VS.NET 2002

Bob
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 16 '05 #3

P: n/a
Hi Frans,

Well actually rewiring the events in the InitializeComponent() method
doesn't really help me much, as soon as I turn around they disappear
again.

As for it being a know issue, I have not been able to find any
documentation on MSDN on the web, do you know where I can find it??

thanx
Rekkie

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #4

P: n/a
Rekkie <my************@spam.email.com> wrote in news:e5J6FnOWEHA.2972
@TK2MSFTNGP12.phx.gbl:
Well actually rewiring the events in the InitializeComponent() method
doesn't really help me much, as soon as I turn around they disappear
again.

As for it being a know issue, I have not been able to find any
documentation on MSDN on the web, do you know where I can find it??

thanx
Rekkie


I don't know about this being documented anywhere. I have a slight hunch
about it though. After restoring my project and fixing the problem, I
did one little edit in an external editor, and the problem reappeared.

Did you ever load any pages into UltraEdit or Notepad or anything like
that?

Bob Dickow
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 16 '05 #5

P: n/a
I doubt this is it but I had some system classes disappear on me. It was the
ListBox.SelectedIndices and every other class under the ListBox. I found out
it was because I had gotten a new laptop and when I moved he product over I
copied the project files incorrected into the wrong sub-directories.
Meaning, the project file is suppose to be one folder above all the classes
and forms, and I had the project file in the same folder. Somehow I also had
a project file one folder above too, so VS was probably getting confused.
Once I got rid of the project file in the sub folder, everything started
working correctly. Its probably not your problem here.

David
"Robert Dickow" <di***********@uidaho.edu> wrote in message
news:Xn*****************************@209.25.157.13 0...
Rekkie <my************@spam.email.com> wrote in news:e5J6FnOWEHA.2972
@TK2MSFTNGP12.phx.gbl:
Well actually rewiring the events in the InitializeComponent() method
doesn't really help me much, as soon as I turn around they disappear
again.

As for it being a know issue, I have not been able to find any
documentation on MSDN on the web, do you know where I can find it??

thanx
Rekkie


I don't know about this being documented anywhere. I have a slight hunch
about it though. After restoring my project and fixing the problem, I
did one little edit in an external editor, and the problem reappeared.

Did you ever load any pages into UltraEdit or Notepad or anything like
that?

Bob Dickow
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----

Nov 16 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.