我正在使用文件上傳控件在asp.net上傳文件,我成功地能夠上傳文件在服務器上。現在的問題是如果我重新加載頁面文件再次上傳到服務器上。上傳文件後如何清除文件上傳控件? 如果代碼是必需的,那麼我會粘貼它。asp.net fileupload控制刷新重複上傳
//=========== Uploaded file format ============================
string filename = System.IO.Path.GetFileName(imageUploader.FileName);
//============== Upload the file ==============================
imageUploader.SaveAs(MapPath("~/articleimage/")+filename);
//-------------------- Msg ----------------------------------
showMessage("Image Uploaded Successfully");
無關發佈您的代碼,但是這是有趣的:' showError(「Image Uploaded Successfully」);'成功上傳是錯誤? – David
哈哈不介意這...它只是用於調試... – greatmajestics