// 读取文件夹中某类型的图片 using System.IO; DirectoryInfo imagesfile = new DirectoryInfo (Server.MapPath( ~/image )); FileInfo [] fileinfo = imagesfile.GetFiles( *.jpg ); foreach ( FileInfo fi in fileinfo) { strpic += img src=/../image/ +
// 读取文件夹中某类型的图片
using System.IO;
DirectoryInfo imagesfile = new DirectoryInfo (Server.MapPath("~/image" ));
FileInfo [] fileinfo = imagesfile.GetFiles("*.jpg" );
foreach (FileInfo fi in fileinfo)
{
strpic += " + fi.Name + "/" />" ;
}