insert comma

S

susie

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.


Thank you.
 
H

HD

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top