Visual Studio 2008 Source View Rearranging Object Tags

I normally do all my development in source view when creating pages but periodically I jump to design view so that I can mess with the smart-tags of a control that im not sure about. Now after doing that my source view is all goofed up because the designer rearranged and messed up tab depth on all my objects, etc.. So, annoyed, i went through and fixed the formatting to look like what I like. To my dismay after i ran the code it went back and rearranged all my objects again. Is there an option to turn that behavior off?
Who is Participating?
dimajConnect With a Mentor Commented:
All of the formatting is located here:
Tools | Options. Then from the left tree view navigate to Text Editor | <language of your choice>

Later on, when you're coding, you can press a hotkey (such as Ctrl + E D) to automatically reformat you code to adhere to the settings you've specified.

Hope this helps.

Tools --> Options
dxproz232Author Commented:
Lol yeah i understand its an option but which specific one and where is it?
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

dxproz232Connect With a Mentor Author Commented:
Couldnt get Ctrl + E, D to do anything but Ctrl + K, F worked perfectly!
dxproz232Author Commented:
Ctrl +K,F requires you to select the region you want to format
Ctrl +K,D formats the entire screen
Maybe it's because you've configured your VS for a different language. I have mine set to C# developer and Ctrl + E,D works; maybe for other languages you have different shortcuts (which could also be modified.)

I'm glad you've got it working though!

Rose BabuSenior Team ManagerCommented:

in source view do select all (CTRL+A)

Then Right click -> Format Selection.

by doing this the design page tags will be formatted correctly, if any problem then the line number will be shown in error msg.

dxproz232Author Commented:
The code i provided seemed to do the trick but Dimaj pointed me in the right direction.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.