【发布时间】:2015-06-04 06:08:07
【问题描述】:
例如,假设我在 foreach 中有以下代码来生成表。在其中一列中有一个“单击此处查看更多详细信息”类型的链接。 PurchaseOrderNumber 应该创建一个指向详细信息页面的超链接并传入 PurchaseOrderNumber。示例:/Sales/Details/7000
<td>
@Html.ActionLink("Details", "Index", @Html.DisplayFor(m => item.PurchaseOrderNumber))
</td>
相反,它只是创建指向 /Sales?Length=5 的超链接
我该如何正确地做到这一点?
【问题讨论】:
标签: c# html asp.net-mvc