This is a very basic example;
Declare this in a controller.
var fontAwesomeIcon = "<span class=\"fa fa-redo\" style=\"font-size:30px; color: red; margin-bottom: 20px; \"> Try again</span>";
TempData["message"] = $"{fontAwesomeIcon} <h5>Something went wrong. Please try again. If problem persist, reach out to your point of contact for additional information</h5>";
And you can use it in your view;
<div class="card-body">
  <div id="divMessage">
     @Html.Raw(@TempData["message"]);
  </div>
</div>            

 Add to favorites
Add to favorites