« Home | Better Perfomance of Web Applications » | Display Numerals in Arabic Format » | The Controls collection cannot be modified because... » | Team Foundation PowerToys » | String is All Lower or All Upper Case » | Detecting Chrome browser in ASP.NET » | Chart Control for .net 3.5 » | Increase the VS screen for HTML pages » | Working with Dynamic Controls » | Dynamics CRM 4.O SDK for IPHONE »

Visual Studio Automatically Changing the IDs in Source View

When pasting a snippet of HTML into the Visual Studio source window, Visual Studio will automatically change the IDs to the default naming convention (TextBox1, etc.).






Most of the time though I do not want this to happen since I purposely want to have that ID copy exactly as is since it makes things easier for me when changing the name. For example, it is easier to change FirstNameTextbox to LastNameTextbox than to change TextBox1 to LastNameTextbox.

There is an option to turn the Auto ID elements on paste off. It can be found in:

Tools > Options > Text Editor > HTML> Miscellaneous > Auto ID elements on paste in Source view. Uncheck the box to turn this feature off.














Now Visual Studio will leave IDs alone:


Post a Comment