Razor syntax prevents escaping HTML in an ActionLink

后端 未结 1 1764
没有蜡笔的小新
没有蜡笔的小新 2020-12-11 15:51

I have an ASP MVC 3 site and we are trying to put some styling into the action links.

I want the html to be something like

相关标签:
1条回答
  • 2020-12-11 16:10

    The ActionLink method cannot take HTML.

    You need to make a normal <a> tag, and use @Url.Action(...) for the href.

    0 讨论(0)
提交回复
热议问题