The Simple Answer To VS.NET Designer Woe

0 comments suggest edit

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.

Found a typo or error? Suggest an edit! If accepted, your contribution is listed automatically here.

Comments

avatar

3 responses

  1. Avatar for Jeff Atwood
    Jeff Atwood October 15th, 2005

    Yeah, thank god this is COMPLETELY fixed in VS.NET 2005.



    And no, I'm not being sarcastic.



  2. Avatar for Marty Thompson
    Marty Thompson October 16th, 2005

    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.

  3. Avatar for Haacked
    Haacked October 16th, 2005

    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.