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.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.