Blazor

Is there any equivalent of HTML.RAW in Blazor?

Is there any equivalent of HTML.RAW in Blazor?

To render the RAW HTML, wrap the HTML content using MarkupString value, which is rendered into DOM and HTML or SVG.

 @page "/"
  
  
 @((MarkupString)myMarkup)
  
 @code {
     private string myMarkup =
         "<p class='markup'>This is a <em>markup string</em>.</p>";
 } 

I would suggest you check the below link for better understanding:

https://docs.microsoft.com/en-in/aspnet/core/blazor/components?view=aspnetcore-3.0#raw-html

Sumitra Kumari Shaw

An Engineering graduate who Enjoys building things that live on the internet.