all groups > asp.net webcontrols > october 2003 >
You're in the

asp.net webcontrols

group:

insert comma


insert comma susie
10/31/2003 7:58:43 AM
asp.net webcontrols: How to insert comma to a number entered into a textbox?

Say if the number entered is 10000000000, when user press
enter key, the text in the textbox will be changed to
1,0000,000,000.


Re: insert comma HD
10/31/2003 8:01:10 PM
check the length and String.Insert the string and put it togather with comma
char
say calculate the length and start from right to left.
10000000000
use
str = str.Insert(1,",");
str is now 1,0000000000
str = str.Insert(6, ",");
str is now 1,0000,000000
Keep going,

Regards,

HD
Use custom length marker and say
[quoted text, click to view]

AddThis Social Bookmark Button