No of visitors who read this post: 220
Category: JavaScript
Type: Question
Author: Jerry Blando
No votes yet

Hello

I am getting a problem when I enter a trade value in a box. It just allows two numbers after the end of decimal point. I tested with regex but it did not fix the problem. I hope someone can give me an appropriate solution in this.

Thanks for the help.

Error:

NullReferenceException was unhandled by user code 

Object reference not set to an instance of an object.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

#

The official and the standard is that it allows two numbers after the decimal if you are entering the price. It will not allow you to enter any more figures in it due to the complexity of the figure.

The parameter that you are using will get more complex if you are allowed more numbers after that.

You can also try using a different data type rather than string. Maybe a double string or a float data type is more likely to solve the problem.

Also make sure that the text box properties are not limiting the value. On the right side, you will see the properties of the text box. You may want to edit them.