Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET MVC/VS: How to stop VS inserting automatic IDs in pasted view content?

Is there any way to stop VS (specifically 2008) automatically inserting WebForms Ids in <asp: elements when pasting code into a view?

E.g. by default pasting this into a view:

<asp:Content ContentPlaceHolderID="TitleContent" runat="server"/>
</asp:Content>

Results, annoyingly, in this:

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"/>
</asp:Content>
like image 242
UpTheCreek Avatar asked Dec 03 '25 09:12

UpTheCreek


1 Answers

Tools > Options > Text Editor > HTML > Miscellaneous > Auto ID elements on paste in Source view

like image 187
Wikser Avatar answered Dec 04 '25 22:12

Wikser



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!