all groups > visual studio .net ide > february 2005 >
You're in the

visual studio .net ide

group:

Events etc randomly deleted from "Web Form Designer generated code


Events etc randomly deleted from "Web Form Designer generated code Stephen Davies
2/20/2005 5:51:03 PM
visual studio .net ide:
We are having a severe problem with Visual Studio 2003. When modifying items
in the form designer or working with the html for data in the designer, the
control events are being deleted from the InitializeComponent method of Web
Form Designer generated code. This is driving us crazy and the ctrl-z key
while in code mode is being overworked to retrieve the data.

We have heard of a hotfix for Visual Studio 2002 but nothing is mentioned
about Visual Studio 2003.

--
Regards
RE: Events etc randomly deleted from "Web Form Designer generated Stephen Davies
2/21/2005 1:31:05 AM
Thanks Peter

Seems like a relatively common problem. I have found many postings on
exactly the problem but no answers.

Regards
Stephen Davies

[quoted text, click to view]
RE: Events etc randomly deleted from "Web Form Designer generated code v-phuang NO[at]SPAM online.microsoft.com (
2/21/2005 9:08:58 AM
Hi,

Currently I am looking for somebody who could help you on it. We will reply
here with more information as soon as possible.
If you have any more concerns on it, please feel free to post here.


Thanks for your understanding!

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
RE: Events etc randomly deleted from "Web Form Designer generated Stephen Davies
2/22/2005 12:47:03 AM
[quoted text, click to view]

I am not directly inserting code into this block, I have a component that
creates properties on the page which can be modified. These properties are
stored by the IDE in the said section with all of the other events and
properties.

Not sure that the IDE puts it in there, and then deletes it, by design.

[quoted text, click to view]

As mentioned above the IDE puts the code in there not me.

[quoted text, click to view]

don't really understand, the problem is really annoying, I will follow up re
the hotfix in the page you sent me thanks for checking it out.

Regards
Re: Events etc randomly deleted from "Web Form Designer generated demi
2/22/2005 6:04:16 AM
I have the same problem. And I concur, it happens on
InitializeComponent methods that do not have any custom code i them. I
have a couple of pages that use DeveloperExpress ASPxGrid version 2 (I
think it happens on other pages as well that contain a regular
DataGrid). I have several events hooked up to the grid. Every once in
a while the page stops working. When I look I discover that it's
because the contents of the InitializeComponent method are cleared out
by the IDE. Luckily, I'm using VSS and I go back to a previous version
and copy and paste it back, but it's annoying.

I'm not 100% sure, but I think it happens when you edit the ASPX file
source directly then switch to design mode. Maybe the page has
something on it that confuses the IDE when switching and causes it to
remove the events from the InitializeComponent. Not sure.
RE: Events etc randomly deleted from "Web Form Designer generated v-garych NO[at]SPAM online.microsoft.com
2/22/2005 7:18:09 AM
[quoted text, click to view]

yes Stephen, this is a known issue to the VS.NET 2003.

Generally, the InitializeComponent method is manipulated by the Form
Designer, and the code in InitializeComponent method will be regenerated by
the Web Form Designer now and then, so it will delete your custom code,
however this behavior is by design and I am afraid we don't have a hotfix
for this issue targeting VS.NET 2003:
http://support.microsoft.com/kb/822759

In this scenario, I suggest you to put your custom code out of the
InitializeComponent method, and add it in the function which calls the
InitializeComponent method instead¡­


Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
Re: Events etc randomly deleted from "Web Form Designer generated John Barnes via DotNetMonster.com
2/22/2005 5:57:23 PM
I'm working on a VB.NET Win Forms project and have the same problem.
However, it only happens when I have shared controls on the form

--
RE: Events etc randomly deleted from "Web Form Designer generated v-garych NO[at]SPAM online.microsoft.com
2/23/2005 3:39:39 AM
[quoted text, click to view]

yes Stephen, the KB822759 is also applied to this scenario. For VS.NET
2003, I think contact our Product Support Services would be a good choise.

By the way, this problem will disppear in the VS.NET 2005(Whidbey), we even
don't have the InitializeComponent Function then...


Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
RE: Events etc randomly deleted from "Web Form Designer generated Stephen Davies
2/24/2005 5:53:02 PM
For the record so other don't need to waste their time....

I obtained KB822759 from MS applied the HotFix and didn't make an ounce of
difference, if anything it happened more frequently.

[quoted text, click to view]
RE: Events etc randomly deleted from "Web Form Designer generated v-garych NO[at]SPAM online.microsoft.com
2/25/2005 3:30:23 AM
Hi Stephen,

[quoted text, click to view]

I am regreted that Hotfix could not be applied to your case, it may be
designed only for the general scenario which that Knownledge Base atricle
is covered.

In this situation, if you concider that problem is really critical to your
work, I suggest you contact our Product Support
Services to create a case for the problem directly. And if the problem is
confirmed by Microsoft PSS as a product
issue, PSS won't charge money. Every MSDN subscriber has two free support
incidents. You could use one of them to contact Microsoft PSS. So you don't
need to pay money yet. Surely if the issue is a product issue, you still
have two free support incidents.

For a complete list of Microsoft Product Support Services phone numbers and
information about support costs,
visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;[LN];CNTACTMS


If you don't want to contact Microsoft PSS, you could submit product
feedback on
http://register.microsoft.com/mswish/suggestion.asp?&SD=GN&LN=EN-US&g....

However, I suggest you contact PSS since there would be a support
professional working with you specially on it.

If there is anything unclear, please feel free to post here. We are glad to
be of assistance.


Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.
AddThis Social Bookmark Button