Results 1 to 1 of 1

Thread: Double format Decimal

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2001
    Location
    Miami, Florida
    Posts
    161

    Question Double format Decimal

    I have a web based application that allows people to add an amount and right after the port it converts the amount from double to integer. I modified the backend database field amount to double and tested the amount by entering numbers such as 10.15 and 10.75 and hold the information correctly. But when I go onto the site and add an amount similar to the one above for example 10.15 it will rounded to the nearest dollar 10. If I enter 10.75 it will convert to 11.

    Your help will be greatly appreciated.


    Code:
                if (this.DataSource.BalanceSpecified) {
                          
                    string formattedValue = this.DataSource.Format(TblPaymentRequestTable.Balance);
                    this.Balance.Text = formattedValue;
                  
                   
                } else {  
                    this.Balance.Text = TblPaymentRequestTable.Balance.Format(TblPaymentRequestTable.Balance.DefaultValue);
                                
                }
    Last edited by root2; Jul 2nd, 2009 at 12:02 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width