Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Display HTML tags from database in GridView

Posted on 2006-06-15
4
Medium Priority
?
1,660 Views
Last Modified: 2011-10-03
Does anyone know how I can display the html in the data within my bound GridView control? Right now the gridview is automatcally using HtmlEncode and showinig the html tags.
0
Comment
Question by:HangTenDesign
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 33

Expert Comment

by:raterus
ID: 16912669
Have you tried this?

<asp:templatefield>
  <itemtemplate>
    <%# Bind("myDBfieldWithHTML") %>
  </itemtemplate>
</asp:templatefield>
0
 

Author Comment

by:HangTenDesign
ID: 16914391
Yes, I'm using bound data. I'm also creating the columns on the fly. But this is what I found elsewhere on the web to solve the problem:

----------------------------------

                       bf = new BoundField();
                        bf.HeaderText = reader["field_name"].ToString();
                        bf.DataField = reader["field_id"].ToString();
                        bf.SortExpression = reader["field_order"].ToString();
                        bf.HeaderStyle.Wrap = false;
                        bf.HtmlEncode = false;  //This is the line that solved the problem.
                        ChecklistView.Columns.Add(bf);

----------------------------------

HtmlEncode = false; //This is the line that solved the problem.

0
 

Accepted Solution

by:
CetusMOD earned 0 total points
ID: 17141488
PAQed with points refunded (250)

CetusMOD
Community Support Moderator
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question