Display commas in textbox VB.net -


i have textbox gets value calculation. i'm trying display commas when value on 999.99 i've tried convert.todecimal , convert.tostring doesn't seem work. here code populates field. appreciated.

iskmade1.text = convert.todecimal(ipu1.text) * convert.todecimal(units1.text) 

the iskmade1 field displays decimal correctly, isn't adding commas number.

provided have mydecimalvariable variable in store decimal values format textbox text follows:

dim mydecimalvariable decimal = 1234.56 iskmade1.text = mydecimalvariable.tostring("#,##0.00") 

or have:

dim mydecimalvariable decimal = 1234.56 iskmade1.text = mydecimalvariable.tostring("n", cultureinfo.invariantculture) 

in case need import system.globalization namespace.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -