Customize Visual Studio for ID AutoGenerate

Customize Visual Studio for ID AutoGenerate

In this post we will learn about how to Customize Visual Studio for ID AutoGenerate.

What is ID autogenerate:

When we work in the Web form and create some web form control visual studio automatically generates it’s id that we can see when the page run in the browser. We can turn on/ turn off this behavior to take control of ID as per our requirements.

For example I create a new <div id="MainWrapper"></div> and then copy and paste it in the same file.

VisualStudio pastes <div id="Div1"></div>

It changes the value of id element automatically.

It is even more difficult when I’m trying to copy/paste several times and only change one part of the id.


1) Open ‘Microsoft Visual studio’ from start menu.

2) Click on the Tools Menu in the menu bar.

2) Then, select the menu option named Options…
This will open the options dialog box.

3) Now, select the Text Editor -> HTML -> Miscellaneous  option item from left panel.

4) Then uncheck the checkbox saying “Auto ID elements on paste in Source view”

It’s Done.







Deepak Arora

Deepak Arora is a Software Developer and working continuously in this field from 2011. He work mainly with Microsoft Technology. He holds a Master's in Computer Application and he is MCTS certified person.

Leave a Reply

Your email address will not be published. Required fields are marked *