473,382 Members | 1,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Get html data from database and put it to a page as HTML

Hello friends,

I'm putting html data via CKEditor (a richedittextbox) to my database as string.

I want to put retrievet data AS HTML to my page. How can I do this?

My current code is:
Expand|Select|Wrap|Line Numbers
  1. Me.myContent.InnerHtml = Server.HtmlDecode(myVar)
  2.  
  3. myContent = a Div with runat=server
  4. myVar = retrieved data from database
  5.  
Result is:
Expand|Select|Wrap|Line Numbers
  1. <h1>
  2.   <img alt="Saturn V carrying Apollo 11" class="right" src="http://bytes.com/assets/sample.jpg" /> 
  3.   Apollo 11
  4. </h1> 
  5. <p>
  6.   <b>Apollo 11</b> was the spaceflight that landed the first humans, Americans <a href="http://en.w.... etc. etc.
Jan 24 '13 #1
1 1383
I have solved problem as this:


changed
Expand|Select|Wrap|Line Numbers
  1. Me.myContent.InnerHtml = Server.HtmlDecode(myVar)
to
Expand|Select|Wrap|Line Numbers
  1. Me.myContent.InnerHtml = HttpUtility.HtmlDecode(myVar)
Jan 24 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: cjm | last post by:
I have two problems that I suspect will be bread-and-butter problems for the more experienced guys on here, but I'm not the greatest with js. NB: Code snippets at the bottom The first problem...
1
by: WindAndWaves | last post by:
Hi Everyone This post will probably create a whole new newsgroup....(or I may be referred to one - e.g. rec.dummies) I was wondering if anyone can tell me the answer to a number of related...
0
by: Manystrengths | last post by:
I must warn all of you willing to help me that this is my first go at designing a functional data access page. Please bear in mind that we all start somewhere so if I should be asking the absolute...
5
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact...
1
by: sameer | last post by:
hi all, i have hooked my website to paypal and other e merchant accounts for accepting credit cards. When a payment is done they post the data to my website. i process the data and update the...
0
by: Cheryl Yaeger | last post by:
Hello! I am trying to write a C# application that converts rtf data to html data. I have found several examples on the Web that convert rtf (.doc) documents to html and saves them as html files....
1
by: Gaetan | last post by:
I'm doing a prrof of concept to develop an application to run under WinPE. The application will use WinHTTP to send requests to an ASPX file running IIS 6.0 My problem is that I do not know how...
3
by: jobs at webdos | last post by:
I have a bunch of html pages and a database table with links to them. I want to dynamically display those pages inside a set location on an exsisting asp.net 2.0 page when a link is selected,...
3
by: andrewtayloruk | last post by:
I'm a newbie when it come to things php and i'm having a bit of trouble. I'm trying to insert data from an html form into a mysql database and can't get it to work. Just a few bits about my...
1
by: Arpit Nagar | last post by:
Hi... I am creating a dummy project for collage. Here I had choosen my project as Jewelleryshoping. Now the scenerio is like that thier are jewellry item which I had display in table format with...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.