You can simply add javascript confirmto your ActionLinklike:
<%=Html.ActionLink(a => a.ID, "Go", new { onclick="return confirm('Are you sure?');" })%
EDIT: Not sure what you need to know how to implement ActionLinkwith an image, but here is a helper function that can add an image to ActionLink:
public static string ActionLinkImage(this HtmlHelper htmlHelper,
string imagePath, string altText, string actionName,
RouteValueDictionary routeValues, IDictionary<string, object> htmlAttributes)
{
string replaceText = "ActionLinkImageReplaceMe";
string linkHtml = System.Web.Mvc.Html.LinkExtensions.ActionLink(htmlHelper,
replaceText, actionName, routeValues,htmlAttributes);
return linkHtml.Replace(replaceText,
String.Format("<img src='{0}' alt='{1}'/>", imagePath, altText));
}
source
share