[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 459
  • Last Modified:

Visual Studio 2008 Source View Rearranging Object Tags

I normally do all my development in source view when creating asp.net 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?
0
dxproz232
Asked:
dxproz232
2 Solutions
 
radcaesarCommented:
Tools --> Options
0
 
dxproz232Author Commented:
Lol yeah i understand its an option but which specific one and where is it?
0
 
dimajCommented:
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.

dimaj
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
dxproz232Author Commented:
Couldnt get Ctrl + E, D to do anything but Ctrl + K, F worked perfectly!
0
 
dxproz232Author Commented:
Ctrl +K,F requires you to select the region you want to format
Ctrl +K,D formats the entire screen
0
 
dimajCommented:
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!

dimaj
0
 
Rose BabuSenior Team ManagerCommented:
Hi,

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.

0
 
dxproz232Author Commented:
The code i provided seemed to do the trick but Dimaj pointed me in the right direction.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now