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.