html.actionlink?查看用户列表 [英] html.actionlink? to view list of users
本文介绍了html.actionlink?查看用户列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
创建跳转链接来计算用户数量
creating a action link to count number of users
推荐答案
请确保该链接的文本是当你将它传递到 ActionLink的
的字符串。也许这是一个错字,但 ActionLink的
(小写的L)是不是一个扩展方法的HtmlHelper
。
Make sure the text of the link is a string when you pass it into ActionLink
. Maybe it was a typo but Actionlink
(lowercase L) is not an extension method on HtmlHelper
.
<%:Html.ActionLink(Model.User.Count().ToString(), "Details") %>
LinkExtensions.ActionLink方法(的HtmlHelper,字符串,字符串)
public static MvcHtmlString ActionLink(
this HtmlHelper htmlHelper,
string linkText,
string actionName
)
这篇关于html.actionlink?查看用户列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文