I am trying to display my blog content that is stored in my database in the form of raw html tags and img tags. I tried using HTML Encode before inserting data in the database and Decode while retrieving the data. After doing so I am getting an output like this.
I want to get an output like this
I tried doing this but nothing worked
//code to put this text into the database
string text = Server.HTMLEncode(userEnteredText);
//code to put while fetching data from DB
string text = Server.HTMLDecode(userEnteredText);
Please note I am using Webforms and not MVC framework
I would be obliged if anyone could help me with this.