views:

208

answers:

1

If I have the following in an ASP.NET Web Form:

and I copy and paste that line in the same page, I usually get the following:

Obviously, nobody is going to name their controls in that way (if you don't want to name a textbox, simply don't asign an ID to it), and it's not nice having to change the ids of pasted controls. The same happens if I copy a control without an explicit ID, VS simply generates one for me.

Is there any way of preventing VS from autogenerating IDs when I copy-paste ASP.NET code?

+7  A: 

Options, Text Editor, HTML, Misc, Auto ID on Paste

By the way, the most similar article contains just the same question (answered, of course). Be more careful next time :)

wRAR
weird, when I was writing the question I couldn't see that question in the similar questions list. Thanks for the link :)
Diego