L
LL
Hi,
How to format 3000.00 to
$3000?
Thanks.
How to format 3000.00 to
$3000?
Thanks.
How to format 3000.00 to
$3000?
double x = 3000.00;
string z = string.Format("{0:C}", x);
<ItemTemplate>
<asp:Label id=Label2 runat="server" Text='<%#
Convert.ToDouble(DataBinder.Eval(Container.DataItem, "Price").ToString())
%>'>
</asp:Label>
</ItemTemplate>
Line 54: <asp:Label id=Label2 runat="server" Text='<%#
Convert.ToDouble(DataBinder.Eval(Container.DataItem,"Price").ToString("$#"))
%>'>
The "Sort" function work before(when click the header column), but now got
this error:
Input string was not in a correct format. .... cut....
Line xx: <asp:Label id=Label2 runat="server" Text='<%#
Convert.ToDouble(DataBinder.Eval(Container.DataItem,"Price").ToString()).ToS
tring("$#") %>'>
Giorgio Parmeggiani said:Hi
I think that the problem is due to the fact that the some row of your
database table have the field "Price" empty.