Here's a tip if you are trying to format a databound field in a GridView, FormsView or DetailsView: You need to turn OFF HtmlEncode if you want to use the DataFormatString attribute of the BoundField tag. Otherwise you'll get some unexpected results.
Read More...