Solved

Format Price in Dreamweaver 8 asp.net vb

Posted on 2008-10-28
2
246 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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
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 …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

770 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