I've been working with the gridiview control for a few weekd now, and I saw some code like this :
<ItemTemplate>
<asp:Label ID="lblTarget" Text='<%# GetTarget(decimal.Parse(Eval("Target", "{0:###0.00}").ToString())).ToString("N2") %>' runat="server"></asp:Label>
</ItemTemplate>
<FooterTemplate>
<%# GetTargetTotal().ToString("N2") %>
</FooterTemplate>
What I want to know is, what does ToString("N2") mean? And why is it used?
<ItemTemplate>
<asp:Label ID="lblTarget" Text='<%# GetTarget(decimal.Parse(Eval("Target", "{0:###0.00}").ToString())).ToString("N2") %>' runat="server"></asp:Label>
</ItemTemplate>
<FooterTemplate>
<%# GetTargetTotal().ToString("N2") %>
</FooterTemplate>
What I want to know is, what does ToString("N2") mean? And why is it used?