0

I am using a file-upload object on my webpage with an "upload" button and a "Status" label. When a file is successfully upload the label's text changes to "File uploaded". If a user would like to upload another file, I want to clear the label text because as it still says "File Uploaded". Not sure how to do this. Please help.

Wahtever
  • 3,597
  • 10
  • 44
  • 79
Jerry Trac
  • 357
  • 4
  • 17

2 Answers2

0

It appears the instantiating a new FileUpload object or clearing the FileUpload attributes are the best leads, as mentioned in this existing SO question:

Here is a similar SO question How to clear file upload text in server side (c#)

Community
  • 1
  • 1
Karl Anderson
  • 34,606
  • 12
  • 65
  • 80
0

You have two way to do this:

client side

Page will be reloaded if file uploaded, you just need to clear the label when page is loaded.

Server side

You can clear it with setting the text of "Status" label to blank after your codes handling uploaded file.

Yemol
  • 29
  • 3