P
peter
Hi, I currently have a field which stores an amount in the database as
an integer. It is stored as cents, so 155 in the databse it is really
$1.55.
Problem is when I Bind it to a datagrid using the Text='<%#
Bind("RecurringPaymentAmount", "{0:c2}") %>'>, it displays as $155.00
instead of $1.55.
Any idea how to easily format this so it displays correctly.
Thanks in advance.
Peter.
<asp:TemplateField HeaderText="Recurring Amount"
SortExpression="RecurringPaymentAmount">
<ItemTemplate>
<asp:Label ID="lblRecurringPaymentAmount" runat="server"
Text='<%# Bind("RecurringPaymentAmount", "{0:c2}") %>'></asp:Label>
</ItemTemplate>
<asp:TemplateField>
an integer. It is stored as cents, so 155 in the databse it is really
$1.55.
Problem is when I Bind it to a datagrid using the Text='<%#
Bind("RecurringPaymentAmount", "{0:c2}") %>'>, it displays as $155.00
instead of $1.55.
Any idea how to easily format this so it displays correctly.
Thanks in advance.
Peter.
<asp:TemplateField HeaderText="Recurring Amount"
SortExpression="RecurringPaymentAmount">
<ItemTemplate>
<asp:Label ID="lblRecurringPaymentAmount" runat="server"
Text='<%# Bind("RecurringPaymentAmount", "{0:c2}") %>'></asp:Label>
</ItemTemplate>
<asp:TemplateField>