Subin Thomas

Subin Thomas

  • NA
  • 4.9k
  • 126.1k

i cant input more than 4 values in a tsxtbox, why?

Feb 13 2019 4:11 AM
<div >
<table class="color">
<tr>
<td>
<asp:Label ID="lblUserName" runat="server" Text="UserName"
style="color: #333333; "></asp:Label>
</td>
<td>
<asp:TextBox ID="textUserName" runat="server" Width="192px" CssClass="background"
MaxLength="4"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="rfvUserName" runat="server" ControlToValidate ="textUserName" ErrorMessage="*Enter User Name" ForeColor="Red">
</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblPassword" runat="server" Text="Password"
style="color: #333333; "></asp:Label>
</td>
<td>
<asp:TextBox ID="TxtPassword" runat="server" Width="192px" CssClass="background"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="rfvPassword" runat="server" ControlToValidate ="TxtPassword" ErrorMessage="*Enter Password" ForeColor="Red">
</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:Button ID="btnLogin" runat="server" Text="Login" CssClass="Button"
Height="34px" Width="122px" onclick="btnLogin_Click"/>
</td>
</tr>
</table>
<asp:Label ID="Label1" runat="server" ForeColor="red" Text="" ></asp:Label>
</div>
this is my code and when i run and type username it takes only 4 values where i have to put values of 5-8

Answers (2)