Monday 15 September 2014

asp.net fileupload control duplicate uploads on refresh -


I am using file upload control in ASP.NET to upload the file, in order to successfully upload the file Enabled server Now the problem is that if I reload the page, then the file is uploaded again to the server. How to clear the file upload control after uploading the file? If the code is required I will paste it.

  // =========== Uploaded file formats ====================== ====== String file name = System.IO.Path.GetFileName (imageUploader.FileName); // ============= Upload the file ============================== imageUploader .SaveAs (MapPath ("~ / articleimage /") + filename); // -------------------- message --------------------------- ------- Show Message ("Image Uploaded"); After successful upload, reload the page using only the response. Redirect to the same page ...    

..

No comments:

Post a Comment