I have below HTML text retrieved from sql server.
"<span style="color: rgb(36, 39, 41); font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);">So, first method looks nice and it's easy but is there is any simpler way to write the second function? Both are working well and giving a correct output.</span>"
I want to convert html to plain text and set it on a label in asp.net.
To do this:
- I have retrieved data from sql server in Dataset.
Set above retrieved to label
<h3 id="lblqNotes" runat="server" class="text-questiondata" style="color:#1E90FF"> </h3>
In code behind:
lblqNotes.InnerText = System.Net.WebUtility.HtmlDecode(values[2]);
But output on label is still html code, not plain text.
Thanks for your help.