Image to base 64 conversion in asp.net
public string ImageToBase64(string ImgUrl) { string base64ImageRepresentation = ""; try { string Imgpath = HttpContext.Current.Server.MapPath("~/AdvertisementImages/") + ImgUrl; byte[] imageArray = System.IO.File.ReadAllBytes(Imgpath); imageArray = System.IO.File.ReadAllBytes(Imgpath); base64ImageRepresentation = Convert.ToBase64String(imageArray); } catch (Exception ex) { return base64ImageRepresentation; ...