Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Storing calculated value to bound text box problem
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Storing calculated value to bound text box problem
Versions des environnements
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01383218
Message ID:
01383218
Vues:
78
I have a form in which the user enters several amounts, which have a data type of "money" in SQL Server. Those amounts are used to calculate a savings amount, which may then be modified by the user if necessary. I have the amounts displaying with a currency format. The problem is that when I store the calculated value to the savings text box, it does not display in formatted text. If I store the new value as a formatted string, I get an error converting the string to a decimal.

I tried
            this.txtSavingsAmt.Text = calculatedNumber.ToString();
            oMyBizObj.CallStateChange(OakLeaf.MM.Main.Business.mmBusinessState.Bind);
but that sets it back to it's original value. For the moment, I'm just leaving the calculated number unformatted. Once it's saved, of course, the correct formatting is displayed. Does anyone have a way to get the currency formatting to display correctly before the save? Thanks.
Linda Harmes
HiBit Technologies, Inc.
Répondre
Fil
Voir

Click here to load this message in the networking platform