ImageUrl=这里直接输出路径不就得了?
难道你数据库存的是二进制的图片?
如果是,用Response.OutputStream.Write方法来输出

解决方案 »

  1.   

    context.Response.OutputStream.Write用这个输出还是 X
      

  2.   

    context.Response.ContentType = "image/jpg";
    "image/jpg"后面的值改下应该可以
      

  3.   

    HttpContext.Current.Response.ContentType = "image/jpeg";
    img.Save(HttpContext.Current.Response.OutputStream, ImageFormat.Jpg);
      

  4.   

    public void ProcessRequest (HttpContext context)
        {
            string id = (string)context.Request["id"];
            my_db.my_data_type type = (my_db.my_data_type)Enum.Parse(typeof(my_db.my_data_type), ConfigurationManager.AppSettings["dbType"]);
            if(id!=null)
            {
                MemoryStream imgStream;
                try
                {
                    my_db.Data dd = new my_db.Data();
                    byte[] blob = (byte[])dd.Execute_Scalar("select img from enterprise where id='" + id + "'");
                    imgStream = new MemoryStream(blob);
                    Image img = Image.FromStream(imgStream);
                    HttpContext.Current.Response.ContentType = "image/jpeg";
                    img.Save(HttpContext.Current.Response.OutputStream, ImageFormat.Jpg);                
                }           
                finally
                {
                    imgStream.Close();
                }
            }
        }
        public bool IsReusable {
            get {
                return false;
            }
        }
    请看电脑,还是显示不出来