<p>I'm using Visual Studio 2008 for an ASP .Net application, and Visual Studio keeps adding blank lines to my aspx file whenever I save, switch to design mode and back to code view, switch to split mode, or switch between files.  Before I save, I will have:</p>

<pre><code>                        &lt;/ContentTemplate&gt;&lt;/asp:UpdatePanel&gt;
                    &lt;/ContentTemplate&gt;
                &lt;/ajax:TabPanel&gt;
            &lt;/ajax:TabContainer&gt;
</code></pre>

<p>Then, it will magically transform into:</p>

<pre><code>    &lt;/ContentTemplate&gt;&lt;/asp:UpdatePanel&gt;


&lt;/ContentTemplate&gt;















&lt;/ajax:TabPanel&gt;
                    &lt;/ajax:TabContainer&gt;
</code></pre>

<p>I know it's mostly an aesthetics issue, but it's also adding 17 lines of nothing to each tab container (and making the file that much longer to scroll through) and it's very annoying.  I've checked that I don't have a misplaced quotation mark, there's no misaligned tags earlier in the file, any ideas?</p>

[{'answer_id': 78486, 'author': 'LizB', 'author_id': 13616, 'author_profile': 'https://Stackoverflow.com/users/13616', 'pm_score': 0, 'selected': False, 'text': "<p>I can't say I've ever experience this with any Visual Studio yet, but try this</p>\n\n<p><strong>Ctrl-E, D</strong> command will automatically reformat the document. (Assuming C# Development Enviroment)</p>\n\n<p><strong>Ctrl-K, Ctrl-D</strong> for Web Development Enviroment</p>\n\n<p>If the document remains as it is with the incorrect spacing then the auto format is the problem. Simple disable the auto-format inside <strong>Options</strong>-><strong>Text Editors</strong>-><strong>HTML</strong>-><strong>Formatting</strong></p>\n"}, {'answer_id': 78562, 'author': 'tbreffni', 'author_id': 637, 'author_profile': 'https://Stackoverflow.com/users/637', 'pm_score': 3, 'selected': True, 'text': "<p>The only time I've seen Visual Studio do something close to this is when the XML/HTML in question is invalid, for example you are missing a closing tag somewhere.</p>\n"}, {'answer_id': 3225944, 'author': 'lauren', 'author_id': 388677, 'author_profile': 'https://Stackoverflow.com/users/388677', 'pm_score': 0, 'selected': False, 'text': '<p>For reasons unknown tab container appears to temporarily render in design environment with long string which seems to cause insertion of blank lines with default settings. Turing off the tag wrapping, seemed to work for me.</p>\n\n<p>Tool/Options/</p>\n\n<p>[Show all settings]</p>\n\n<p>Text Editor/HTML</p>\n\n<p>Wrap tags when exceeding specified lenght</p>\n\n<p>If any interested.</p>\n'}, {'answer_id': 56666421, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>I had the same problem and none of the previous answers here solved it; but I found the solution here: <a href="https://github.com/Microsoft/vscode/issues/12076" rel="nofollow noreferrer">https://github.com/Microsoft/vscode/issues/12076</a>. Go to the <strong>.editor.config</strong> file and set <strong>insert_final_newline = false</strong> (or simply remove that line).</p>\n'}]
['https://Stackoverflow.com/questions/77957', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/13208/']