wayne on June 6, 2008
Here's one that has bitten me a couple times. When working with the GridView control in .Net 2.0, and you apply a format string to a column, such as:
<asp:BoundField DataField="Amount" HeaderText="Paid Amount" DataFormatString="{0:c}" />
the column doesn't show any formatting. This should render the column as a currency value ($x.xx), but it doesn't. By adding HtmlEncode='False' to your BoundField object, it will then work.
<asp:BoundField DataField="Amount" HeaderText="Paid Amount" HtmlEncode="false" DataFormatString="{0:c}" />
Why? Here's a good post that has been around a while on the topic.
Perhaps I'll remember this now instead of wasting a few minutes finding the solution again and again...lol.