asp.net我想要访问的图像作为对象url的引用 [英] asp.net the Image I want to reach as a reference to the object url

查看:74
本文介绍了asp.net我想要访问的图像作为对象url的引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

   

string [] savedFiles = Directory.GetFiles(.... Path ....)

   

string[] savedFiles=Directory.GetFiles(....Path....)

for(int i = 0; i< savedFiles.Length; i ++)

for(int i=0; i<savedFiles.Length; i++)

{

  &NBSP; image + i( i。th image )= savedFiles [i];   // 我该怎么做

    image+i (i. th image) =savedFiles[i];  // How can I do this

}

推荐答案

System.IO.FileStream fs = System.IO.File.Open (@"C:\MyImage.jpg", FileMode.Create);
bmp.Save (fs, System.Drawing.Imaging.ImageFormat.Jpeg);
fs.Close(); 

或者:

if (dataSet.Tables[0].Rows.Count == 1)
{
    Byte[] data = new Byte[0];
    data = (Byte[])(dataSet.Tables[0].Rows[0]["pic"]);
    MemoryStream mem = new MemoryStream(data);
    yourPictureBox.Image= Image.FromStream(mem);
} 


这篇关于asp.net我想要访问的图像作为对象url的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆