How do I bypass the HTML encoding when using Html.ActionLink in Mvc?

前端 未结 5 1407
醉酒成梦
醉酒成梦 2020-12-08 02:27

Whenever I use Html.ActionLink it always Html encodes my display string. For instance I want my link to look like this:



        
5条回答
  •  死守一世寂寞
    2020-12-08 02:39

    Decode it before passing the value in. Just had this same issue (different characters) and it works fine:

    Eg:

    @Html.ActionLink(HttpUtility.HtmlDecode(_("&")), "Index", "Home")
    

    Annoying though

提交回复
热议问题