cweston
cweston

Reputation: 11647

AJAX Toolkit - AsyncFileUpload Control Return Data

I am using the AsyncFileUpload control provided by the Ajax Toolkit. I am needing to store the file uploaded in a temporary directory and then return the temporary file name back to the client (or set viewstate) so that on the next post back it can be committed to a database.

Does anyone have any ideas as the best approach to do this, if even possible?

Upvotes: 1

Views: 818

Answers (1)

vsapiha
vsapiha

Reputation: 176

Yes. It is possible. OnClientUploadComplete is fired on the client-side after the upload has completed. Then just use get_fileName() to return the name of the file being uploaded.

Example: function uploadCompleted(sender, args) { alert(args.get_fileName()); }

Upvotes: 1

Related Questions