Solved

HTML tags are returned from the SQL Server database

Posted on 2012-04-03
2
182 Views
Last Modified: 2012-08-13
My users submit their text with a wysiwyg text editor. When I return the submitted values the HTML tags are also returned. How could I avoid this and see the formatted text instead?
Any help is appreciated.

<asp:BoundField HeaderText="Message" DataField="Message" ItemStyle-HorizontalAlign="Left" ></asp:BoundField>
0
Comment
Question by:baxtalo
[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
2 Comments
 
LVL 21

Accepted Solution

by:
masterpass earned 500 total points
ID: 37803607
I would say to use a contenttemplate and then bind to a label directly! This way the html will get rendered in the browser and you will be able to see the formatted text!

hope this helps!
0
 

Author Closing Comment

by:baxtalo
ID: 37804113
Yes, it helped. Thank you very much. This is what made it work:

<asp:TemplateField HeaderText="Message" ItemStyle-HorizontalAlign="Left" >
<ItemTemplate><%# Eval("Message") %>
</ItemTemplate>
</asp:TemplateField>
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

689 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