I have 2 textboxes with the ID=”situps” and ID=”pushups” The reason they’re in Div’s is because I need them to use number pads only when used on a tablet. I was wondering if there was a way to retreive that ID in c#. Here is the code for the textboxes:
<div style="display:none">
<asp:TextBox ID="situps" runat="server" Height="16px"
ontextchanged="TextBox1_TextChanged" Width="108px"></asp:TextBox>
</div>
<input onblur="document.getElementById('<%=Sits.ClientID %>').value = this.value" type="tel" style="width: 86px" />
<div style="display:none">
<asp:TextBox ID="pushups" runat="server" Height="16px"
ontextchanged="TextBox1_TextChanged" Width="108px"></asp:TextBox>
</div>
<br />
Push-ups <input onblur="document.getElementById('<%=Push.ClientID %>').value =
this.value" type="tel" style="width: 86px" />
<br />
I’ve figure out how to retrieve Labels within a formview, but can’t figure out how to get DIV ID’s from texboxes outside of formview.
Thanks!!!
I think I’ve made a simple mistake. I must’ve had duplicates of the names situps and pushups. I am now able to grab the ID!!