Solved

How to display HTML from a SQL table to a ASPX file?

Posted on 2006-10-20
7
204 Views
Last Modified: 2008-02-26
Hi there

I have a SQL table, one of the columns is a text field, that text field has HTML. How do I get the HTML displayed to the user. I've used a textbox, but that acually display the HTML code.

Hope this makes sense?
Thank you
Mousemat24
0
Comment
Question by:mousemat24
[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
  • 3
  • 3
7 Comments
 
LVL 6

Assisted Solution

by:apb2
apb2 earned 250 total points
ID: 17772855
Hi

If you are writing an HTML editor the best way are to use <div> tags this can be set as server control <div id="divHTML" runat="server"></div>

here you'll be able to view the html and also edit it.

http://www.devarticles.com/c/a/HTML/Building-a-WYSIWYG-HTML-Editor-Part-1/

HTH

apb2
0
 
LVL 20

Accepted Solution

by:
REA_ANDREW earned 250 total points
ID: 17772856
yeh create a div

<div id="YourHtmlDiv" runat="server"></div>

then in your code you have to Access the InnerHtml

so.... in C# this would be

YourHtmlDiv.InnerHtml = "<h1>Hello</h1>";
0
 

Author Comment

by:mousemat24
ID: 17773963
I've ended up using a literal control, is that ok?
0
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!

 
LVL 20

Expert Comment

by:REA_ANDREW
ID: 17773979
as long as you set the InnerHtml of a control which has InnerHtml. Yes that is fine.
:-)

Andrew
0
 

Author Comment

by:mousemat24
ID: 17774286
dont understand Andrew, I'm finding a literal control takes care of that automatically. Strange, but it works ok
0
 
LVL 20

Expert Comment

by:REA_ANDREW
ID: 17774293
so have you got your solution now?
0
 

Author Comment

by:mousemat24
ID: 17774318
is, I'm using the literal control, thats before I got any response from you 2. I think I might have to split the points, hope thats ok with you guys?
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

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…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 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