R
rockdale
Hi, All
I have a datagrid with TemplateColumn as following. Notice the "{0:c}"
format the price as $8.90 for 8.90 and ($7.8) for -7.8
<ItemTemplate>
<asp:Label id=lblPrice runat="server" Text='<%#
DataBinder.Eval(Container, "DataItem.price","{0:c}") %>'>
</asp:Label>
</ItemTemplate>
on the backend C# code:
I need to get the price and do some calculation
decimal decPrice =
decimal.Parse(lblPrice.Text,System.Globalization.NumberStyles.AllowCurrencySymbol);
It does not work.
How should I do to get the original numeric without the formatting?
Thanks a lot
I have a datagrid with TemplateColumn as following. Notice the "{0:c}"
format the price as $8.90 for 8.90 and ($7.8) for -7.8
<ItemTemplate>
<asp:Label id=lblPrice runat="server" Text='<%#
DataBinder.Eval(Container, "DataItem.price","{0:c}") %>'>
</asp:Label>
</ItemTemplate>
on the backend C# code:
I need to get the price and do some calculation
decimal decPrice =
decimal.Parse(lblPrice.Text,System.Globalization.NumberStyles.AllowCurrencySymbol);
It does not work.
How should I do to get the original numeric without the formatting?
Thanks a lot