tags:

views:

398

answers:

2

I'm using AJAX functionality to submit a form which contains a FileUpload control.

How can I reset the FileUpload (ie. remove the File listed) in code?

I do the same thing for a TextBox, which obviously has as easier way to set it back to the default...

TextBox.Text = "";

But The FileUpload doesn't have a similar option. Any ideas?

Thanks!

+1  A: 

An article at - value-ASP-NET-FileUpload-Control.aspx

adatapost
A: 

Browsers won't allow JavaScript to tell the form whatever a type=File field will contain. It can only be changed by the user.

Havenard