我如何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'.