As I have not idea what is your difficulties, I just assumed you have one of the most common problem: encoding of HTML entities. If so, please see:
http://msdn.microsoft.com/en-us/library/73z22y6h.aspx[
^].
See the class
System.Web.HttpUtility
:
http://msdn.microsoft.com/en-us/library/system.web.httputility.aspx[
^].
If you have other problems, please don't blame me: you did not tell us about them. You are welcome to ask other questions.
[EDIT, after OP's clarification]
Perhaps
iframe
is not what you need, because its content is external to your HTML file, is loaded from an external file. You would need to create a separate HTML file with the content taken from your database, generate
iframe
element with the attribute
src
, set the attribute's value to the name of the generated file. This would be too ugly.
You should better use any block element like
div
and set its attribute
innerHTML
to the content taken from your database. It cannot be the whole HTML file though, only the HTML fragment which is valid under the
div
element.
If both solutions are not good enough for you (which can happen), you should review your design. After all, your requirement is not to use
iframe
or something certain. You just need certain rendering applied dynamically.
—SA