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

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?
 
D

David Jessee

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(.....))%>'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top