The Simple Answer To VS.NET Designer Woe

It’s happened to all of us. You are happily coding along (in Visual Studio .NET 1.x), minding your own business when you decide to switch from the code view to the designer and back to the code view. That’s when you experience...The Woe.

Now to prevent the woe, this post has some great tips.

However, I discovered something quite by accident, and I’m not sure if it works in all cases. But I was working on an ASPX page and switched to design mode and then switched back and noticed that the HTML was completely messed up. Various tags had been upper-cased (for god knows what reason) and my indenting was kicked in the nuts.

So I hit CTRL+Z twice.

It appears that VS.NET took two steps to fubar my code, but both steps were still in the command stack. So undoing twice restored my ASPX markup to its beautiful pristine state.

[ad] Free Bug Tracking & Project Management Software Axosoft’s OnTime 2007 allows software development teams to collaborate on software projects by tracking everything from defects to enhancements to helpdesk incidents in one easy-to-use database driven by an intuitive Windows, Web or VS.NET Integrated UI. Get a Free Single-User License ($200 Value!)

What others have said

Requesting Gravatar... Jeff Atwood Oct 15, 2005 8:45 PM
# re: The Simple Answer To VS.NET Designer Woe
Yeah, thank god this is COMPLETELY fixed in VS.NET 2005.

And no, I'm not being sarcastic.

Requesting Gravatar... Marty Thompson Oct 17, 2005 6:06 AM
# re: The Simple Answer To VS.NET Designer Woe
Unfortunately this doesn't help when another developer touches the page and checks it back in with the garbled HTML.

I had heard that it's not a problem with VS 2005, and I'm definitely looking forward to that.
Requesting Gravatar... Haacked Oct 17, 2005 8:38 AM
# re: The Simple Answer To VS.NET Designer Woe
Public ridicule and the occasional flogging will help with the other developers who check in the garbled HTML.

And yes, this is not a problem with VS.NET 2005, but for those of us who still have projects using VS.NET 2003, it pays to have everyone know this.

What do you have to say?

(will show your gravatar)
Please add 1 and 1 and type the answer here: