界面代码
后台代码
//图片存在
//photo/US000001/我的相册/1.jpg
//其中US000001是u.use_id可以获取的,我的相册是DropDownListPhoto.SelectValue的值
private void DataListPhotoBind()
{
//其中u.use_id是用户id
string path = Server.MapPath("photo") + "\" + u.use_id + "\" + DropDownListPhoto.SelectedValue;
DirectoryInfo imagesfile = new DirectoryInfo(path);
FileSystemInfo[] fileinfo = imagesfile.GetFileSystemInfos();
DataListPhoto.DataSource = fileinfo;
DataListPhoto.DataBind();
}
现在绑定上,但是无法正常显示图片,求帮助?