我正在尝试实现一个简单的ActionLink
,用于使用ASP.NET MVC删除记录。目前为止,这是我的代码:
<%= Html.ActionLink("Delete",
"Delete",
new { id = item.storyId,
onclick = "return confirm('Are you sure?');"
})%>
然而,它没有显示确认框。显然我漏掉了一些东西或者链接构造不正确。有人能帮忙吗?