GridView Control.
Problem:
Add HTML to HeaderText
Solution:
Set the attribute HtmlEncode to false
Example:
<asp:BoundField DataField="pk" HeaderText="Primary<br />Key" HtmlEncode="false" />
Comments:
I also found that to add DataFormatString="{0:d}" to work, you'll also have to set the HtmlEncode attribute to false for that given BoundField
Example:
<asp:BoundField DataField="AsOfDate" HeaderText="As Of Date" HtmlEncode="false" DataFormatString="{0:d}">
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment