Reputation: 25
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 :
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 :
and when i debug i see this:
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
Reputation: 5719
@Html.Raw(Model.Specification)
// or
@Html.Raw(System.Web.HttpUtility.HtmlDecode(Model.Specification))
Upvotes: 1