[Solved] How to save HTML code in Sql Server database for correct display?


Another possible solution is to replace the html tags before storing in database. What I did is :-

text=text.replaceAll("<", "&lt;");
text=text.replaceAll(">", "&gt;");

and then stored text in database and its working. Thanks to Bibin Mathew.

solved How to save HTML code in Sql Server database for correct display?