|
-
Oct 7th, 2005, 10:14 AM
#1
Thread Starter
New Member
Formatting currency using Databinder.Eval method
Hi all
I'm trying to format a currency as well as a date using code that I found in MSDN. The actual MSDN page:
http://msdn.microsoft.com/library/de...sevaltopic.asp
The actual code on my ASP.NET page:
<td class="DataCell" style="width=100px"><nobr><%# DataBinder.Eval(Container.DataItem, "unit_cost", "{0:c}") %></nobr></td>
It's exactly the same line, but the data still outputs on the page as an unformatted currency. I've tried uppercase "C" and lowercase "c", but it just seems to ignore the format parameter. Am I doing something wrong here?
Any help appreciated. P.S. Can anyone tell me what I have to wrap around my text to make the code appear as "code"?
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|