【发布时间】:2018-08-02 15:28:31
【问题描述】:
我想在删除前提示一个确认对话框。我在这里找到了this 答案,效果很好
@Html.ActionLink(
"Delete",
"Delete",
new { id = post.OriginalPost.ID },
new { onclick = "return confirm('Are you sure you wish to delete this post?');" });
但正如我在核心一中所理解的那样,应该避免使用 ActionLinks。那么有没有任何标签助手或不同的方法来做到这一点?
【问题讨论】:
标签: c# asp.net-core asp.net-core-mvc asp.net-core-tag-helpers