How to specify Numeric Format i.e Numeric part and decimal part?
-
Hi , i want to specify the maximum number of digits for numeric part and the Decimal part in a text box. i tried specifying precision and maxlength of the text box but then it if we input the max length then the precesion cannot be inputted and it gets resetted to the maxamount which should not be possible. like if Maxlength=8 precsion = 2 input required:123456.90 possible input required : 12345678.89 which is not possible so is there any way we could specify the format of the numeric part and as well the decimal part. which would restrict for only that particular input format. like : dddddddd.dd thanks in advance.... cheers, sriharsha
-
Hi , i want to specify the maximum number of digits for numeric part and the Decimal part in a text box. i tried specifying precision and maxlength of the text box but then it if we input the max length then the precesion cannot be inputted and it gets resetted to the maxamount which should not be possible. like if Maxlength=8 precsion = 2 input required:123456.90 possible input required : 12345678.89 which is not possible so is there any way we could specify the format of the numeric part and as well the decimal part. which would restrict for only that particular input format. like : dddddddd.dd thanks in advance.... cheers, sriharsha
You can use regular expressions to do the validation. In between, do you how to build a regular expression for this?
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
-
You can use regular expressions to do the validation. In between, do you how to build a regular expression for this?
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
hi, but what is the validation expression we need to give for it. i tried giving ; but does not work properly. Thanks and Regards, sriharsha
-
Hi , i want to specify the maximum number of digits for numeric part and the Decimal part in a text box. i tried specifying precision and maxlength of the text box but then it if we input the max length then the precesion cannot be inputted and it gets resetted to the maxamount which should not be possible. like if Maxlength=8 precsion = 2 input required:123456.90 possible input required : 12345678.89 which is not possible so is there any way we could specify the format of the numeric part and as well the decimal part. which would restrict for only that particular input format. like : dddddddd.dd thanks in advance.... cheers, sriharsha
Hi, you want the same ?
string strD= 1000.1234; int dI =strD.indexof("."); string DecimalVal=strD.substring(dI,dI+1); string strVal=strD.substring(0,dI);
Hope it will help you.. :-OThanks, Sun Rays To get something you must have to try once. My Articles
-
Hi, you want the same ?
string strD= 1000.1234; int dI =strD.indexof("."); string DecimalVal=strD.substring(dI,dI+1); string strVal=strD.substring(0,dI);
Hope it will help you.. :-OThanks, Sun Rays To get something you must have to try once. My Articles
hi, actually i want to fix the max length of numric part and the decimal part. thanks and regards, sriharsha
-
Hi, you want the same ?
string strD= 1000.1234; int dI =strD.indexof("."); string DecimalVal=strD.substring(dI,dI+1); string strVal=strD.substring(0,dI);
Hope it will help you.. :-OThanks, Sun Rays To get something you must have to try once. My Articles
Hi , I used Regularexpression and its working fine. as: ; in controltovalidate : speicfy the textbox to validate ValidationExpression: which validates the expression in the format (8,2) otherwise gives error. Thanks for all suggestions. sriharsha