我有以下代码:
@Html.ActionLink("Hello " + User.Identity.GetUserName() + "!",
"Manage", "Account",
routeValues: null,
htmlAttributes: new { title = "Manage" })
我只想显示文本(具有正确的 html 属性)(即no link)
您能帮我正确的语法吗?
我想你可以使用网址.操作 method.
<a href="@Url.Action("ActionName")">
<span>"Hello " + User.Identity.GetUserName() + "!"</span>
</a>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)