我有像这样的mvc actionLink
@Html.ActionLink("Delete", "Delete",
new { id = item.Id },
new { onclick = "return confirm('Are you sure you wish to delete this article?');" })
现在,我想将@Localized.AreYouSure
字符串放在return confirm部分中。我怎么能这样做。
答案 0 :(得分:3)
我想这就是你想要的意思:
@Html.ActionLink("Delete", "Delete",
new { id = item.Id },
new { onclick = "return confirm('" + Localized.AreYouSure + "');" })