I want to write something like:
@( checkCondition ? "<span class='label'>Right!</span>" : "")
But it is showing the source code instead the HTML, there is a easy way to do this?
Thank you!
You can use @Html.Raw(mystring)
method like this:
@( checkCondition ? Html.Raw("<span class='label'>Right!</span>") : Html.Raw(""))