码迷,mamicode.com
首页 > 数据库 > 详细

EasyUI 读数据库图

时间:2016-10-20 07:32:56      阅读:186      评论:0      收藏:0      [点我收藏+]

标签:

EasyUI 读数据库图

      function edit_dg() {
            //选中一行,获取这一行的主键值
            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 读数据库图

标签:

原文地址:http://www.cnblogs.com/yimeishui/p/5979284.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!