Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
For asp.net :

what is the code for the reset button for file upload control?
as for text is Textbox1.text = ""
for file upload what will it be?
Posted

1 solution

As far as I know, the File Upload Control just has a browse button, when clicked, allows you to select a file on your computer for uploading.

You must be referring to another file upload control, could you elaborate on that?

As far as adding a reset button to partner with the file upload control, I don't see the point in having one. Unless you need to delete some data, or reset some text or images back to default.

As far as the object goes, it would be the object name plus what you want to do.

fuMasterImage.saveas( "some physical path" )
fuMasterImage.ContentLength
 
Share this answer
 
Comments
Fiona Tan 27-Jun-12 11:28am    
I want to reset the file uploader control is in taking away the attached file in the mail. When I click the reset button, all the texts in the textboxes will be default to blank, so the attachment in the file upload control should also be gone.
jkirkerx 27-Jun-12 12:32pm    
the file upload control in just a 1 way trip. you click it and it uploads a file.

Of course, many just use textbox placeholders to hold the physical or virtual url of the file, it which you calculate, and set.

You have to add another button, that will clear the preview image, reset the textboxes to empty.

There is no need to clear the fileupload control, unless you want to go as far as deleting the file that was uploaded.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900