Answer: With the help of
Length property of textbox control,we can count number of characters:-
<asp:TextBox ID="TextBox1" runat="server" Text="Rajesh Kumar"></asp:TextBox>
var count = document.getElementById('<%=TextBox1.ClientID %>').value.Length;
alert(count);
Output:12
Asked In: Many Interviews |
Alert Moderator