Ejemplo n.º 1
0
        public static MvcHtmlString AdminDeleteImageLink(this HtmlHelper html, string YesRedirectUrl, string NoRedirectUrl, string AltText)
        {
            UrlHelper Url = new UrlHelper(html.ViewContext.RequestContext);

            TagBuilder link = new TagBuilder("a");

            link.MergeAttribute("href", Url.AdminConfirmUrl(YesRedirectUrl, NoRedirectUrl));

            TagBuilder img = new TagBuilder("img");

            img.MergeAttribute("src", Url.Content("~/Areas/Admin/Content/images/delete.png"));
            img.MergeAttribute("alt", AltText);
            img.MergeAttribute("title", AltText);

            link.InnerHtml = img.ToString();

            return(MvcHtmlString.Create(link.ToString()));
        }