I’m running asp.net MVC razor. I’m trying to remove quotes from a string in my view.
so I’m returning this
"<p><strong>test</strong</p>"
and my wanting this
<p><strong>test</strong></p>
here is what I’ve tried:
@foreach (var post in Model)
{
var cont = post.postContent.Trim('"');
<div class="post">
<h2>@Html.ActionLink(post.postTitle, "Details", "Home", new { id = post.postId }, null)</h2>
@cont
<p>@post.postDate</p>
</div>
}
Are you seeing HTML encoded text (when you view the source) where
@Contis displayed? If so, try