Formatting in Data Bound Controls

I recently ran across a problem with data bound controls in ASP.NET, where I set the string formatting specification (by the book) and nothing happened. If you come across this problem you are probably missing the HtmlEncode attribute on your column specification. Without this the braces are probably encoded and thus the formatting string is unrecognisable to the control. Consider adding the HtmlEncode=”false” to your binding specifications - it worked for me.

Dialogue & Discussion