0
我用這篇文章上傳後沒有刷新頁面顯示圖像。
Display image after upload without page refresh or postback using ASP.Net AsyncFileUpload Control
我定製FileUploadComplete
,因爲我要爲上傳的文件創建名稱:上傳後顯示圖片
protected void FileUploadComplete(object sender, EventArgs e)
{
string filename = System.IO.Path.GetFileName(AsyncFileUpload1.FileName);
filename = Uploader.CreateNameForFile(filename);
AsyncFileUpload1.SaveAs(Server.MapPath(this.UploadFolderPath) + filename);
Session["image"] = filename;
}
後,我改變了代碼,圖像不上傳後顯示。
我該怎麼辦?