Monday, November 23, 2009

Currency format in asp.net

we can convert currency into required format in asp.net

float amount =100
label.Text=amount.ToString("N2");

it displays as 100.00

by default the currency format is US-format

if you want to change this into indian rupee format

include this code in to your web.config file

< system.web />
< globalization culture="te-IN" uiCulture="auto"/>
</system.web>

No comments:

Popular Posts