Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

dealing with asynchronous nature of AjaxFileUpload

$
0
0

I am using the AjaxFileUpload control on an email form.  My goal is to allow the user to add attachments.  Once the user uploads attachments, I need a temporary place to store them somewhere before the user presses the Send button at which point, I use ESW  managed code to add attachments.

var message = new EmailMessage(service)
{
   Subject = txtSubject.Text,
   Body = txtBody.Text
};
message.ToRecipients.Add(txtRecipient.Text);

message.Attachments.AddFileAttachment(filepath);

The problem is, how do I tell the AjaxFileUpload control where the temporary folder is? Please keep in mind that each email form should have its own temporary folder and the user can have multiple email forms open at a time.  I need a unique folder for each form.  I tried storing the Guid name of the temporary folder in a hidden field, but the upload control does not see it when the OnUploadComplete event is triggered.  


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>