Can I change the auto-intent of controls when inserting duplicate identifiers in Visual Studio 2010 or higher

When I copy and paste the control several times, with the identifier entered, this will prevent duplicate identifiers:

<asp:TextBox ID="txtExample" runat="server"/>
<asp:TextBox ID="TextBox1" runat="server"/>
<asp:TextBox ID="TextBox2" runat="server"/>
<asp:TextBox ID="TextBox3" runat="server"/>
<asp:TextBox ID="TextBox4" runat="server"/>
<asp:TextBox ID="TextBox5" runat="server"/>

etc.

We tend to use the naming txtDescription. txt to control, then the significant part of the name.

Is there a way to force templating to specify those control names like "txt1", "txt1", etc., and so on for all other controls.

+3
source share
1 answer

> > HTML > " Auto ID " "? , ? ,

<asp:TextBox id="txt" runat="server" />

. 'txt' 'txtDescr'. , , ID.

+1

All Articles