Visual Studio 不断添加空行 [英] Visual Studio keeps adding blank lines

查看:43
本文介绍了Visual Studio 不断添加空行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将 Visual Studio 2008 用于 ASP .Net 应用程序,每当我保存、切换到设计模式并返回代码视图、切换到拆分模式或在两者之间切换时,Visual Studio 都会不断向我的 aspx 文件添加空行文件.在我保存之前,我将:

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:

                        </ContentTemplate></asp:UpdatePanel>
                    </ContentTemplate>
                </ajax:TabPanel>
            </ajax:TabContainer>

然后,它会神奇地变成:

Then, it will magically transform into:

    </ContentTemplate></asp:UpdatePanel>


</ContentTemplate>















</ajax:TabPanel>
                    </ajax:TabContainer>

我知道这主要是一个美学问题,但它也向每个标签容器添加了 17 行无内容(并使文件滚动浏览的时间更长),这非常烦人.我已经检查过我没有错位的引号,文件前面没有错位的标签,有什么想法吗?

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?

推荐答案

我唯一一次看到 Visual Studio 做类似的事情是当有问题的 XML/HTML 无效时,例如您缺少结束标记某处.

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.

这篇关于Visual Studio 不断添加空行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆