Solved

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

Posted on 2006-10-20
7
203 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
  • 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

679 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