Hi,
I have an aspx.cs page which uploads the RadAsyncUpload UploadedFiles collection to Azure per the following button click event. I've been asked to upload the files automatically, as soon as the user hits the RadAsyncUpload Select button, rather than having an extra button on the page, but not sure how to do this. Any help with this would be greatly appreciated.
I need to run code similar to the below....
protected void btnAttachFiles_Click(object sender, EventArgs e)
{
Boolean isUploaded = false;
for (int i = 0; i <= RadAsyncUpload1.UploadedFiles.Count - 1; i++)
{
try
{
Telerik.Web.UI.UploadedFile file = RadAsyncUpload1.UploadedFiles[i];
// upload file to azure
byte[] fileDataByteArray = new byte[file.InputStream.Length];
file.InputStream.Read(fileDataByteArray, 0, (int)file.InputStream.Length);
isUploaded = myAzure.UploadBlob(fileDataByteArray, RadAsyncUpload1.UploadedFiles[i]);
}
catch (Exception exc)
{
lblError.Text = exc.Message;
}
}
}
Thank you very much,
Randy Sullivan