简单问题!2003能显示正常,到2005不能了 代码如下:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
public partial class Product_DataListPic : System.Web.UI.Page
{
public int count = 0;
string[] files;
private void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack)
{
string strFileName = "2007320141461712137.jpg,20073231536183754455.jpg,2007323157157502802.jpg ";// 要取的文件集合
string[] arr = strFileName.Split( ', ');//把文件集合存入数组
ArrayList list = new ArrayList() ;
for (int i = 0; i < arr.Length; i++)
{//
string fN = arr[i].ToString();
//获取文件名称
//string[] files=Directory.GetFiles(Server.MapPath( "image/vs.net "), "arr[i].ToString() ");
files = Directory.GetFiles(Server.MapPath(@ "../files "), fN);
for (int j = 0; j < files.Length; j++)
{
string strPath = files[j].ToString();
list.Add(@files[j]);
}
}
&nb