user3918776
user3918776

Reputation: 11

Rendering as "&" in browser

I am using below code in view:

@Html.Raw(HttpUtility.HtmlDecode(@expertTrckerReportTO.Name))

on output string "&" is coming as "&".

Can any one help ?

Screen shot for reference

Upvotes: 1

Views: 486

Answers (1)

Minh Nguyen
Minh Nguyen

Reputation: 2191

Have you tried one of these?

HtmlString:

@(new HtmlString(myString))

MvcHtmlString:

@MvcHtmlString.Create(myString)

Upvotes: 1

Related Questions