Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Convert plain text with html tags to html string and render it in Blazor

$
0
0

Sample:

@{     var s = "<p>Sample text</p>"; }

Expectation:

Sample text.

I want it rendered on browser but I couldn't render it. It just outputs the whole value of s as text string. I already try

@(new HtmlString(s))

encoded it with HttpUtility.HtmlEncode and decode it with HttpUtility.HtmlDecode but still no use.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>