By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,426 Members | 2,928 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,426 IT Pros & Developers. It's quick & easy.

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

P: n/a
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?

Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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(.....))%>'

"The Colonel" <co**********@budweiser.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
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?

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.