Solved

Format Price in Dreamweaver 8 asp.net vb

Posted on 2008-10-28
2
267 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
[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
  • 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

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!

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
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-…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 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