I get this as pure HTML:
<label for="txtPais">Pais:</label>
<input name="ctl00$ContentPlaceHolder1$txtPais" type="text" id="ctl00_ContentPlaceHolder1_txtPais" class="textInput" />
In my actual code in Visual Studio I have this:
<label for="txtPais">Pais:</label>
<asp:TextBox ID="txtPais" runat="server" CssClass="textInput"></asp:TextBox>
How would I apply a label for this textbox?
For other people who landed here with the same google search as me... The "for" attribute in label tag helps people with accessibility tools, like screen readers, to know what text box the label is for.
It is recommended to wrap some inputs inside of labels for accessibility (See this example).
I got this answer from the post that, as it happens is mentioned in a comment in the original question.
You should use the
<asp:Label...>
as detailed in this blog post on HaackedThis should convert correctly with the ID being converted.