public static HtmlString CtrlImage(this HtmlHelper html, string viewName, string id, string idButton) { var ctrl = new CtrlImageModel { ViewName = viewName, Id = id, IdButton = idButton }; return(new HtmlString(ctrl.GetHtml())); }
public Image GetImageLogoFromByteArray(CtrlImageModel imgLogo) { byte[] byteArrayImage = imgLogo.ByteImage; Image image; if (byteArrayImage != null) { MemoryStream streamImage = new MemoryStream(byteArrayImage); image = Image.FromStream(streamImage); } else { image = null; } return(image); }
public static HtmlString CtrlImage(this HtmlHelper html, string id, byte[] byteImage = default(byte[]), string height = "24", string width = "24", string imageType = "circle", string altText = "Logo del patrocinador ", bool disabled = false) { var ctrl = new CtrlImageModel(id, byteImage, imageType, altText, height, width, disabled); return(new HtmlString(ctrl.GetHtml())); }