Solved

Input string was not in a correct format

Posted on 2004-04-18
6
616 Views
Last Modified: 2010-04-15
Hi
Can anyone help with the title problem

I have a currency column in the db, when I add it to the site page and convert it to decimal then submit the form I receive the error.

Input string was not in a correct format

the text box is: <%# Math.Round(Double.Parse(CustDetails.FieldValue("BidAmount", Container))).ToString("F") %>

I have no other server side code on the page.

Can anyone help with this problem
George
0
Comment
Question by:Tourist_Search
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 11

Expert Comment

by:Agarici
ID: 10858228
the error message simply states that the string CustDetails.FieldValue("BidAmount", Container) could not be parsed as a double

try to view the value of that column (display it in a message box for example)

hth.
A.
0
 
LVL 29

Accepted Solution

by:
David H.H.Lee earned 500 total points
ID: 10860469
Tourist_Search,
Try this :
<%# Math.Round(Double.Parse((CustDetails.FieldValue("BidAmount", Container)).ToString())).ToString("F") %>
0
 

Author Comment

by:Tourist_Search
ID: 10860576
Thanks x_com

You have had a busy day today

George
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 29

Expert Comment

by:David H.H.Lee
ID: 10860922
Tourist_Search,
I'm glad if i could help.

x_com
0
 
LVL 20

Expert Comment

by:TheAvenger
ID: 10864201
A little bit faster code would be:

<%# Math.Round(Convert.ToDouble (CustDetails.FieldValue("BidAmount", Container))).ToString("F") %>
0
 

Author Comment

by:Tourist_Search
ID: 10864312
Thanks Avenger
I tried that but for some reason it would not work
George
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question