js中的本地化字符串消息

时间:2012-08-20 17:40:43

标签: javascript asp.net-mvc html.actionlink

我有像这样的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部分中。我怎么能这样做。

1 个答案:

答案 0 :(得分:3)

我想这就是你想要的意思:

@Html.ActionLink("Delete", "Delete",
   new { id = item.Id },
   new { onclick = "return confirm('" + Localized.AreYouSure + "');" })