code layout

  • Thread starter Thread starter et
  • Start date Start date
E

et

How do I get Visual Studio to quit modifying the layout of my code? In
Tools, Options, Text Editor, All Languages, Tabs, I have set to None.

In HTML/XML, I have tabs set to none; all automatic formating is unchecked

Yet when I set up, for instance, a table, and I want the code to be on
separate lines, like this:

<asp:table
runat="server"
grindlines="both">
</table>

etc., somewhere along the way the code ends up all on one line, like this
<asp:table runat="server" gridlines="both"></asp:table>

When there's a lot of parameters, this gets ridiculous, and I find I'm
re-arranging code more often than writing it!

Thanks.
 
You can't.
Have to wait for version 2.0.

Some people *never* switch between views.

Use Dreamweaver for the HTML and maintain a backup at all times.
 
Before changing to Design mode from HTML mode, make sure that you save the
file. Then this usually does not occur. If you can, try to add your solution
to source control. This way, whenever VS tries to edit your code, you will be
notified to check the file out, so simply say no. But generally, this does
not happen if you save your code in the html view before switching back to
design view I think. (Not sure though)

Ethem
 
I have delt with this before and what you need to do to resolve / solve this
problem is you need to set your tools > options and in there set your default
view to html and not design. VS reformats everything when ever you view a
page in design view. If you are not using the designer for creating your
page than this will solve your problem without having to go through all the
complications of saving and adding to vss.
 
No, unfortunately this wouldn't help because all you are doing is to set the
default mode to html. Whenever you go to the design mode for any reason, the
same thing will occur.

I agree that putting the file to VSS is an exteremly bad solution, but it's
not really a solution proposal, just a result of using VSS. In anycase, when
I save the file and turn to the design mode, if I don't change anything and
go back to the html, then VS does not mess with the html. Of course, if you
change something through the designer, expect the html to change.
Unfortunately there's nothing that can stop that.

Sorry,

Ethem Azun
 
Back
Top