Solved

Format Price in Dreamweaver 8 asp.net vb

Posted on 2008-10-28
2
235 Views
Last Modified: 2012-05-05
Need to format a price. Trying:

<%# spItemList.FieldValue("ItemPrice", Container)).ToString("{c:0}")  %>
<%# spItemList.FieldValue("ItemPrice", Container)).ToString("c:0")  %>
<%# Int32.Parse(spItemList.FieldValue("ItemPrice", Container)).ToString("c:0")  %>
<%# Int32.Parse(spItemList.FieldValue("ItemPrice", Container)).ToString("c0")  %>
<%# Int32.Parse(spItemList.FieldValue("ItemPrice", Container)).ToString("c")  %>

Last three get this error message:

Exception Details: System.FormatException: Input string was not in a correct format.

Any ideas? Thanks.
0
Comment
Question by:LazarusBlack
  • 2
2 Comments
 

Author Comment

by:LazarusBlack
ID: 22824931
anybody?
0
 

Accepted Solution

by:
LazarusBlack earned 0 total points
ID: 22825026
got it myself. it was

<%# Decimal.Parse(spItemList.FieldValue("ItemPrice", Container)).ToString("C")  %>
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

932 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

12 Experts available now in Live!

Get 1:1 Help Now