If i use raw html <input />
with placeholder like:
<input id="TextSearch" name="TextSearch" placeholder="" type="text" value="" style="font-family: 'FontAwesome'" />
it renders like: that is fine. But if i use Asp.net mvc Html helper like:
@Html.EditorFor(m => m.TextSearch, new { placeholder = "", style="font-family: 'FontAwesome';" })
it renders like: it can't render FontAwesome icon. It treats as string.
How can i render it correctly using Html helper @Html.EditorFor()
?
You need to used HttpUtility.HtmlDecode for this, so your HTMLHelper should be like below,