当前位置:Gxlcms > 数据库问题 > EasyUI 读数据库图

EasyUI 读数据库图

时间:2021-07-01 10:21:17 帮助过:2人阅读

//选中一行,获取这一行的主键值 var idImg = $("#tbDeviceClassBrowstab").datagrid(getSelected).pid; $("#imgId").attr("src", "/ashx/Device/tbDeviceClass.ashx?action=image&pid=" + idImg);
     <td style=" padding:5px; " colspan="1" rowspan="8" >
                      <img id="imgId" alt="图片" border=0 align="middle"  src=""  width="200" height="200"> </img>
                   </td>

后台:

                byte[] imagebytes = null;
                imagebytes = (byte[])dtimg.Rows[0]["DevImage"];
                HttpContext.Current.Response.ContentType = "image/jpeg";
                HttpContext.Current.Response.BinaryWrite(imagebytes);

 

EasyUI 读数据库图

标签:

人气教程排行