Solved

Input string was not in a correct format

Posted on 2004-04-18
6
603 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
6 Comments
 
LVL 11

Expert Comment

by:Agarici
Comment Utility
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
Comment Utility
Tourist_Search,
Try this :
<%# Math.Round(Double.Parse((CustDetails.FieldValue("BidAmount", Container)).ToString())).ToString("F") %>
0
 

Author Comment

by:Tourist_Search
Comment Utility
Thanks x_com

You have had a busy day today

George
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 29

Expert Comment

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

x_com
0
 
LVL 20

Expert Comment

by:TheAvenger
Comment Utility
A little bit faster code would be:

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

Author Comment

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

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

771 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now