I have html in my data in MySql but when I retrieve the data in c# GridView it shows up. This does not happen when I pull the data in a classic asp page. How do I get rid of the HTML such as hyperlink and mailto markup but still retain the hyperlinks and mailto format in the asp.net c# web page. When I show the gridview all the markup is there instead of the actual hyperlink or mailto or even the paragraph formatting.
-
if you can possibly get rid of the html out of your real data that's what I would concentrate on. the alternative is using regular expressions and i would not want to go there...jazb– jazb2018-10-11 03:04:05 +00:00Commented Oct 11, 2018 at 3:04
-
Default behavior of ASP.NET is to HTML-encode anything you output to a web page. You have to explicitly tell it not to if you want the HTML actually rendered. Something like stackoverflow.com/questions/19445196/…Tieson T.– Tieson T.2018-10-11 03:11:17 +00:00Commented Oct 11, 2018 at 3:11
-
Show us a minimal code exampleJeroen Heier– Jeroen Heier2018-10-11 03:24:00 +00:00Commented Oct 11, 2018 at 3:24
-
Thanks all for your comments Tieson T. helped to solve the issue and I can now use my HTML formatting in MYSQL and it renders correctly. Thanks allcharcad61– charcad612018-10-15 13:48:10 +00:00Commented Oct 15, 2018 at 13:48
Add a comment
|