Problem on integer validation

L

Luigi

Hi all,
in a simple .aspx page (ASP.NET 2.0) I have a validator control for a
textbox where the users can insert only numeric values.
I have this HTML:


<asp:TextBox ID="txtCC" runat="server" MaxLength="12"></asp:TextBox>

<asp:RequiredFieldValidator ID="valReqCC" runat="server"
controlToValidate="txtCC" Display="Dynamic" errorMessage="C/C
obbligatorio"></asp:RequiredFieldValidator>

<asp:CompareValidator Display="Dynamic" ID="CompareValidator1"
runat="server" controlToValidate="txtCC" type="Integer"
operator="DataTypeCheck" errorMessage="Conto Corrente solo numerico, please"
/>

The problem is when the user insert a number of many digits (like
100000001120) the validator control start. When the number is small, not runs.

How can I solve to allow user to insert many numbers?

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top