Hey I just downloaded the trial verison and place the control on the web page and everything works good. Now I need to get to the uploaded event. And I dont see one there. Is the event only with the purchased version ? We would like to try out the events and if everything looks good we are looking forward to buy the product.
Vish
5/16/2008 10:02 AM
I'm working through similar issues, but I did purchase it. In code, you should be able to see the methods the control exposes like this: myvistaControl. and the intellisense comes up. There are a LOT of methods there, and I am looking for documentation on them.
Brad
5/16/2008 11:48 AM
The trial version is fully functional so you can plug into the events. Sorry we have not completed the documentation yet so in the meantime please use the intellisense as Brad suggests.
Below is an example code for implementing the Uploaded event.
First subscribe to the event in Page_Load method of the page:
if (FileVistaControl.Uploaded == null)
FileVistaControl.Uploaded += new EventHandler<FileVistaUploadedEventArgs>(FileVistaControl_Uploaded);
Then write the event handler:
private void FileVistaControl_ Uploaded(object sender, FileVistaUploadedEventArgs e)
{
//You can use e.RootFolder.MapPath(e.RelativePath) to
//get the physical path of only the folder that the files are uploaded to
//Get the paths of the uploaded files by walking through UploadedFiles collection
string filePaths;
foreach (GleamTech.Web.FileTransfer.UploadedFile uploadedFile in e.UploadProgress.UploadedFiles)
filePaths += uploadedFile.FullPath + ", ";
}
Cem Alacayir
5/20/2008 4:29 AM
Ok it is not working if I try to upload only one file. Its posting back only when I upload 2 or more files. The uploadmethod that I used was flash so not sure if that is an issue.
Vish
5/20/2008 6:38 AM
Ok, you are right, the event was not being raised when a single file was uploaded via flash upload. I have sent you the fix via email.
Cem Alacayir
6/6/2008 9:01 AM
FYI, this fix is included in v1.5.7.
Cem Alacayir
6/20/2008 7:59 AM