我需要上传图片。我编码如下:
string filename = "";
string FilePath = "";
filename = Path.GetFileName(FileImage.FileName);
FilePath = Server.MapPath("./JQueryImages");
string destPath = Path.Combine(FilePath, filename);
FileImage.PostedFile.SaveAs(destPath);
ViewState["ImagePath"] = destPath.ToString();
ImgUploaded.ImageUrl = destPath;
LblUploadMsg.Text = "Image uploaded successfully";
LblUploadMsg.ForeColor = Color.Green;
图像进入一个文件夹JQueryImages
,但我有一个图像控件ImgUploaded
在加载时不显示图像。当我检查我的解决方案文件夹图像时没有加载。我需要to include each image
上传后。我不想包含每个图像。什么可以解决这个问题。感谢您的帮助。