datagrid - display HTML, don't render (VB)

  • Thread starter Thread starter The Colonel
  • Start date Start date
T

The Colonel

I have a database of our company's HTML email templates - name,
subject, etc. Well, some are for HTML emails, and the template_text
column contains HTML. When I display in a datagrid, it REALLY screws
with the formatting, not to mention the INSERT and UPDATE statements.
How can I best display HTML as text in a datagrid?
 
In the Datadrid Designer, turn your column into a template column
Then, in your aspx file, change the databinding on the resultant Label to

Text='<%# Server.HtmlEncode(Databinder.Eval(.....))%>'
 
Back
Top