Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Format Numeric Values
Message
 
À
06/09/2007 00:26:10
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01252494
Message ID:
01252873
Vues:
15
Thanks Bonnie.
Regards,

Gerard

>Gerard,
>
>Take a look at the string.Format() method. Here's an example, but look at the documentation to see what other kinds of format strings you might want to use:
>
>
>double x = 12;
>string.Format("{0:N}", x);
>
>
>~~Bonnie
>
>
>
>>Hi. re asp.net Web Forms
>>I have a value in a dbl variable and I want to show it on a
>>form
>>My code is: txtTotal.Text = dbf.ToString();
>>
>>I would like to format this always with 2 decimal points, and
>> right aligned in the text box on the form .
>>
>>Any ideas on how to do this in c# code appreciated.
>>regards,
>>Gerard
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform