用AJAX传送了一个值给服务器页面
服务器页面根据这个值查询数据库得数据然后用GDI+绘制了一张图片
然后把图片保存在流里面了!
怎么返回给客服端页面???
MemoryStream dms = c.Draw(); //绘制的图片保存在流里面
Response.ClearContent();
Response.ContentType = "image/Jpeg";
Response.BinaryWrite(dms.ToArray());在客户端页面xmlhttp.responseText接收来是乱码这应该怎样接收????
服务器页面根据这个值查询数据库得数据然后用GDI+绘制了一张图片
然后把图片保存在流里面了!
怎么返回给客服端页面???
MemoryStream dms = c.Draw(); //绘制的图片保存在流里面
Response.ClearContent();
Response.ContentType = "image/Jpeg";
Response.BinaryWrite(dms.ToArray());在客户端页面xmlhttp.responseText接收来是乱码这应该怎样接收????
abc.aspx 用二进制的形式,输出ccc.gifxmlhttp.responseText就是返回abc.aspx?id=989889img.src = abc.aspx?id=989889
直接在src里面写abc.aspx?id=989889这样的路径且传参数即可,不过不明白为什么楼主不用.ashx