Posted on: 11/21/2013 5:12:07 AM | Views : 279

Hi,
m storing images in sql server as Byte,when i retrieve my images want to convert byte to image display?


My code:
Master.asmx
[WebMethod] public static string Show() {
for (int i = 0; i < dtt.Rows.Count; i++) {
 StringBuilder htmlBuilder = new StringBuilder(); string imageBase = Convert.ToBase64String((byte[])dtt.Rows[i]["ProductImage"]); string images = string.Format("data:image/gif;base64,{0}", imageBase); htmlBuilder.Append("<img src=" + images + " alt='your image' size='24' class='avatar img-circle' onclick='show(this)' runat='server' />"); }
retun htmlBuilder.ToString();
}--
binding ajax cant send large data
Ajax
$(document).ready(function MasterLoad() { $.ajax({ type: "POST&quo ...

Go to the complete details ...