all groups > visual studio .net general > february 2004 >
You're in the

visual studio .net general

group:

Annoying behavior - designer automatically messes up the code


Annoying behavior - designer automatically messes up the code Amit
2/26/2004 11:11:05 AM
visual studio .net general:
Hi
I'm using VS.NET 2003 to develop web apps using ASP.NET and C# and having this annoying problem. Everytime I open an aspx page in the designer it attempts to format it. And since I have the file in SourceSafe, it asks me to check it out. This is a minor annoyance because I just say cancel to it, but the biggest headache is that sometimes it automatically removes code. The type of code it most often removes is when binding event-handlers to events (in the InitializeComponent method). Moreover it doesn't do it all the time - one day out of the blue it decides to delete these links and then I'm left scratching my head trying to figure out why my app isn't working
The other type of code that it *always* removes is when I have a "runat='server'" attribute in a <head> or <body> tag

I know other people have been having this problem but I can't seem to find a solution. It most definitely looks like a bug and there should be a fix for it
Thank
Re: Annoying behavior - designer automatically messes up the code harry_bosch
2/26/2004 1:06:58 PM
[quoted text, click to view]


Don't hold your breath. The C++ development system is just as buggy, or
worse, and there are no fixes. Your complaint has been mentioned here
repeatedly, and the situation remains the same. Oh, I hear they are working
on a service pack that might get released in a year or so (I wonder how
they justify using the term "service" here :-)

--
Annoying behavior - designer automatically messes up the code buckrogerz NO[at]SPAM aztravelcenter.com
2/26/2004 2:35:40 PM
I am also having the same problem.
My Code lose seems to happen I am copying and pasteing
attributes between tags.
Please forward any resolution to this appearent bug to
buckrogerz@aztravelcenter.com
[quoted text, click to view]
and C# and having this annoying problem. Everytime I open
an aspx page in the designer it attempts to format it. And
since I have the file in SourceSafe, it asks me to check
it out. This is a minor annoyance because I just say
cancel to it, but the biggest headache is that sometimes
it automatically removes code. The type of code it most
often removes is when binding event-handlers to events (in
the InitializeComponent method). Moreover it doesn't do
it all the time - one day out of the blue it decides to
delete these links and then I'm left scratching my head
trying to figure out why my app isn't working.
[quoted text, click to view]
have a "runat='server'" attribute in a <head> or <body>
tag.
[quoted text, click to view]
can't seem to find a solution. It most definitely looks
like a bug and there should be a fix for it.
[quoted text, click to view]
Re: Annoying behavior - designer automatically messes up the code Paul
3/1/2004 12:27:59 AM
[quoted text, click to view]

There is no solution to this reformatting, and to the dissappearing code
in InitializeComponent. This has been a bug for YEARS and I understand
its not fixed in the next version either -- it probably has its own
annoyances added as well. The dissapearing code bug improved in vs.net
2003 but its still there. Since it won't be fixed, you have to learn how
to live with it. I've actually learned how to get the formatter to work
for me a little. I never open aspx files in the designer without saving
my html first. If it gets mangled in the designer I close the file
without saving it, then opening the previous saved version. It has
become second nature. I try to only use the designer when I am lazy and
want to hook up some events. Turn off all automatic formatting in
options, this may help in some situations, but you can't turn it off
completely. Its a brain dead propellerhead bug by a bunch who think they
own your machine. Personally I think another company wrote the designer
editors, so microsoft can't fix it. I've been told this is wrong however.
AddThis Social Bookmark Button