I am new to C# and i want to display a html string (saved in database from ckEditor ) to the page as html
<div class="descriptionText">
<%
Response.Write(dynamicHtml);
%>
</div>
it display as:
<p> test ht<u>ml test </u>html<strong> test html </strong></p>
But is should be :
test html test html test html
NOTE : please suggest solution in which I can do Response.Write the string
try this:
in your codebehind, bind your HTML to the literal:
i’m assuming you are getting the HTML text from a database through some query, you basically have to bind the result to the literal.
UPDATE:
this seems to be working aswell for me:
In your ASPX page:
in your code behind:
page load: