سؤال

I have mvc actionLink like this

@Html.ActionLink("Delete", "Delete", 
   new { id = item.Id }, 
   new { onclick = "return confirm('Are you sure you wish to delete this article?');" })

Now, I want to put @Localized.AreYouSure string inside return confirm section. How can I do this.

هل كانت مفيدة؟

المحلول

I guess this is what you want/mean:

@Html.ActionLink("Delete", "Delete",
   new { id = item.Id },
   new { onclick = "return confirm('" + Localized.AreYouSure + "');" })
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top