1

i have a database which stores the page name and HTML content.

When the page loads i want to load the HTML content from the DB and render it on the page somehow, how can i do this? What sort of control should i use?

2 Answers 2

4

Use the LiteralControl, and just dump your HTML content into it.

string somehtml = "<div>stuff</div>";
MyLiteralControl.Text = somehtml;
Sign up to request clarification or add additional context in comments.

Comments

3

You can use <asp:LiteralControl>. Set it's Text property.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.