Pretty-Printing in XP.NET??

R

Richard Lionheart

Hi All,

I've written some code in a .aspx file that I like the looks of. However,
when I run it in VS.NET, VS sometimes throws away a lot of the indentation,
which makes it difficult for me to work on. I think it occurs when I create
a mal-formed <form>. Is there a way to defeat this behavior or otherwise
pretty-print the code to restore my formatting?

Right now, my work around is to save the code in a .txt file, test my
code, replace any condensed code that VS gives me with the saved code.
 
T

Tim Scott

Richard,

You might try changing some of the Text Editor options. In VS 2003, go
to Tools > Options > Text Editor > HTML\XML. See Format > Apply
Automatic Formatting, and Tabs > Indenting (try setting to none).

Alternatively, to pretty-print your document, select all of the text in
it Edit > Select All and then Edit > Advanced > Format Selection. The
common shortcut to this is CTRL+A, CTRL+K, CTRL+F.

If the formatting isn't work, it may be as you said, and the IDE is
having problems parsing your document structure.

Good luck!

-- Tim Scott
http://geekswithblogs.net/tscott
 
R

Richard Lionheart

Hi Tim,

Thanks for the ideas. Strangely, the symptom has gone away, somehow,
probably because I cleaned up every single error. Right now, I'm saving
old versions before I save a revised version. It's working for now, so I'm
just saving your advice for the time being.

Again, thanks,
Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top