Solved

Format Price in Dreamweaver 8 asp.net vb

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
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 video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

821 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