If I drag a control from the toolbox in Visual Studio (2008+SP1) into an ASPX page I get a proposal for an ID:
<asp:Button ID="Button1" runat="server" Text="Button" />
That's nice and helps not to forget to assign an ID. Most of the time I rename the ID like:
<asp:Button ID="MySpecialButtonForSpecialTask1" runat="server" Text="Button" />
Now I have a task 2 (3, 4, ..., n) and need a button "MySpecialButtonForSpecialTask2". So I copy and paste the first one with ID="MySpecialButtonForSpecialTask1". That's the result:
<asp:Button ID="Button1" runat="server" Text="Button" />
That's not nice since I need to change now "Button1" to "MySpecialButtonForSpecialTask2" but I would prefer to change "MySpecialButtonForSpecialTask1" to "MySpecialButtonForSpecialTask2".
Is there any setting or trick in VS to prevent assigning new IDs after copy and paste?
Update
I'm not looking for the option
"Tools > Options > Text Editor > HTML> Miscellaneous > Auto ID elements on paste in Source view"
since it also turns off creating IDs for controls inserted from the toolbox. I only would like to switch off this when copy & paste.