Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Storing calculated value to bound text box problem
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Storing calculated value to bound text box problem
Environment versions
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01383218
Message ID:
01383218
Views:
79
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.
Reply
Map
View

Click here to load this message in the networking platform