Range validator not working with decimal value with comma
Hello.I have below code in asp.net with textbox.
If I put value in textbox with decimal and comma like, "1,000.00".
In range validator, I have given min value 0 and max 2000.
Here, value inserted should allow but because of comma, it always give validation that out of range. How to solve this.
<asp:TextBox runat="server" ID="txtAmounts" Width="95px" MaxLength="10" AutoPostBack="false"
OnTextChanged="txtAmounts_TextChanged" onkeydown="return (event.keyCode!=13);"
Enabled='<% #Eval("MakeBasicEditable")%>' Text='<%#Eval("salarygivenamount") %>'
Style="text-align: right;"></asp:TextBox>
<asp:FilteredTextBoxExtender runat="server" ID="ftbextamounts" TargetControlID="txtAmounts"
FilterType="Custom" ValidChars="1234567809.,">
</asp:FilteredTextBoxExtender>
<asp:RangeValidator runat="server" ID="rangvalAmount" ControlToValidate="txtAmounts"
Type="Double" MinimumValue='<% #Eval("Minamount")%>' MaximumValue='<% #Eval("Maxamount")%>'
ErrorMessage="Amount is not in valid range" Display="None" ValidationGroup="SaveTransfer"
Enabled='<% #Eval("ShowRangeValidator")%>'></asp:RangeValidator>