ASP MVC Razor encode special characters in input placeholder
I think this post will help you: HTML encode decode c# MVC4 I think there are other ways to get this behaviour, but this is one option of using the TextBox: @Html.TextBox(“CompanyName”, HttpUtility.HtmlEncode(“Your company's name”)) There is also HttpUtility.HtmlDecode, which might help with our save action. update if you wrap HttpUtility.HtmlDecode around your place holder: … Read more