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}">
Showing posts with label HtmlEncode. Show all posts
Showing posts with label HtmlEncode. Show all posts
Thursday, January 11, 2007
Subscribe to:
Posts (Atom)