Saeed Sheikh
Saeed Sheikh

Reputation: 25

asp.net core razor view output quots problem

I want to show my texteditor content on razor view it contains html tags and it saved on database but when i run my website its look like a string value look at the cod and result. this is the value stored on database :

enter image description here

Now on razor view

<div class="container">
   div class="row">
       <div class="col-lg-8 offset-lg-2">
           @Model.Specification
       </div>
  </div>
</div>

and finlay out out on browser is : enter image description here

and when i debug i see this:

enter image description here

i try many ways by many browsers but result is same i dont khow whts the problem id did this before in other project by php using ehco and it works fine but i dont khow why on asp it doesnt work can anyone help me???i just want normal view i mean tags show like html tags not like string value

Upvotes: 0

Views: 24

Answers (1)

LazZiya
LazZiya

Reputation: 5719

@Html.Raw(Model.Specification)

// or

@Html.Raw(System.Web.HttpUtility.HtmlDecode(Model.Specification))

Upvotes: 1

Related Questions