Convert Figures in Words

Posted by Raj.Trivedi under ASP.NET on 10/29/2012 | Points: 10 | Views : 1217 | Status : [Member] [MVP] | Replies : 1
Hello Team,

I have a Price Column in database and the datatype is int,the value stored in it is also int but in asp.net page i want it to display it in words.
For eg:- if the value stored in database is 70000 then in asp.net it should show Seventy thousand.I am getting the data from database in a datatable and binding it to datalist so i want it to display to a literal as Words.

Regards
Raj.Trivedi

Regard's
Raj.Trivedi
"Sharing is Caring"
Please mark as answer if your Query is resolved



Responses

Posted by: Deepraj on: 10/30/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
we can display value like if 123 as one two three. For that we can write custom code.
1)Read value and convert it to string(Value string).
2)Reverse the Value string.
3)int.Parse(value[0]) compare value concat that string as result string let it be zero.
4)repeat step 3 until result string is done.

Raj.Trivedi, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response