我如何prevent Visual Studio中的重命名我的控制? [英] How do I prevent Visual Studio from renaming my controls?

查看:211
本文介绍了我如何prevent Visual Studio中的重命名我的控制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我贴的东西像

<asp:DropDownList ID="DropDownListExpirationDate" runat="server" />

上已经有ID为 DropDownListExpirationDate 控制一个ASPX文件,它会重新命名新粘贴的控制, DropDownList1

onto an ASPX file that already has a control with ID DropDownListExpirationDate, it will rename the newly-pasted control as DropDownList1.

<asp:DropDownList ID="DropDownList1" runat="server" />

我宁愿它没有。我宁愿这只是粘贴正是我复制的。

I'd rather it didn't. I'd rather it just paste exactly what I copied.

有没有一种方法来禁用此功能?

Is there a way to disable this feature?

推荐答案

在一个快速检查(!)......

After a quick check(!)....

工具>选项>文本编辑器> HTML>其他

Tools > Options > Text Editor > HTML > Miscellaneous

取消选中在源视图上粘贴的自动识别元素。

Uncheck 'Auto ID elements on paste in Source view'.

这篇关于我如何prevent Visual Studio中的重命名我的控制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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