Solved

Input string was not in a correct format

Posted on 2004-04-18
6
609 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
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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Best resource to learn entity framework 2 47
Graphics 2 32
C# Desktop Application 3 54
Add different cell to otherwise similiar row 4 45
Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

831 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