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?
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());
}