如何在复制/粘贴web.config XML节点后阻止自动回车(换行)?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何在复制/粘贴web.config XML节点后阻止自动回车(换行)?相关的知识,希望对你有一定的参考价值。

如何防止复制/粘贴web.config XML节点的自动回车?

注意每个属性是如何在粘贴的代码片段中的新行上(来自web.config文件)

复制这个:

<navigationGraph iViewManager="WebFormViewManager" name="PrintCOCs" state="State" statePersist="SqlServerPersistState" startView="1PrintCOC Set Preferences" endView="3PrintCOC Finished" cacheExpirationMode="Absolute" cacheExpirationInterval="12:00:00">
    <node view="1PrintCOC Set Preferences">
        <navigateTo navigateValue="Cancel" view="Supplies Dashboard" />
        <navigateTo navigateValue="PrintCOCs" view="2PrintCOC Print Chain of Custodies" />
    </node>
    <node view="2PrintCOC Print Chain of Custodies">
        <navigateTo navigateValue="Back" view="1PrintCOC Set Preferences" />
        <navigateTo navigateValue="Finished" view="3PrintCOC Finished" />
    </node>
    <node view="3PrintCOC Finished">
        <navigateTo navigateValue="Finished" view="Supplies Dashboard" />
    </node>
</navigationGraph>

这就是粘贴后的样子:

<navigationGraph iViewManager="WebFormViewManager"
                 name="PrintCOCs"
                 state="State"
                 statePersist="SqlServerPersistState"
                 startView="1PrintCOC Set Preferences"
                 endView="3PrintCOC Finished"
                 cacheExpirationMode="Absolute"
                 cacheExpirationInterval="12:00:00">
    <node view="1PrintCOC Set Preferences">
        <navigateTo navigateValue="Cancel"
                    view="Supplies Dashboard" />
        <navigateTo navigateValue="PrintCOCs"
                    view="2PrintCOC Print Chain of Custodies" />
    </node>
    <node view="2PrintCOC Print Chain of Custodies">
        <navigateTo navigateValue="Back"
                    view="1PrintCOC Set Preferences" />
        <navigateTo navigateValue="Finished"
                    view="3PrintCOC Finished" />
    </node>
    <node view="3PrintCOC Finished">
        <navigateTo navigateValue="Finished"
                    view="Supplies Dashboard" />
    </node>
</navigationGraph>
答案

在Visual Studio 2008中,这是在Tools => Options => Text Editor => XML => Formatting => Attributes下。但看起来你原来的XML太宽了,不能用它自己的优点。 :)

以上是关于如何在复制/粘贴web.config XML节点后阻止自动回车(换行)?的主要内容,如果未能解决你的问题,请参考以下文章

android如何禁止edittext复制粘贴

如何在navicat中复制一条数据并粘贴

配置文件入门 - WebConfig.config常用配置节点介绍

web.config和app.config使用

Web.config配置文件详解

如何在复制/粘贴后禁用 Excel 自动单元格引用更改?