Hi all,
i'm doing a program using c# in creating an insert page..
i want to insert the zip code into the databse and have been validate using validation expression..
<asp:TextBox ID="txtCmpZip" runat="server" BorderStyle="Groove" MaxLength="10" Width="74"></asp:TextBox><asp:RequiredFieldValidator ID="CmpZip" runat="server" ErrorMessage="*" ControlToValidate="txtCmpZip"></asp:RequiredFieldValidator>
<asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" TargetControlID="RegularExpressionValidator2"></asp:ValidatorCalloutExtender>
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" ErrorMessage="Zip code must at least 5 digits" ValidationExpression="\d{5,10}" Display="None" runat="server" ControlToValidate="txtCmpZip"></asp:RegularExpressionValidator>
when i insert "999999999", it will giving me an error said
error converting data type nvarchar to int.
but for the other zip code, it will insert successfully.. any help plz?