InnerText does not render html. It just assigns the value to the specified node.
Sample:
string myContent = "<p>Some HTML markup 3 < 5 text </p>";
myDiv1.InnerText = myContent;
myDiv2.InnerHtml = myContent;
myDiv2.InnerHtml = myContent;
myDiv1 will be rendered as "<p>Some HTML markup 3 < 5 text </p>"
myDiv2 will be rendered as "Some HTML markup 3 < 5 text" in a para.
No comments:
Post a Comment