Re: Ajax Uploader - ManualStartUpload="true"

  •  06-14-2011, 2:16 PM

    Re: Ajax Uploader - ManualStartUpload="true"

    Hi Eric, is there anyway to achieve this using client side code without going back to the server?  Or is there anyway to perform client side code on the file uploaded event?  Basically, I don't want the fileuploaded event to cause a postback.  for example, for an asp button, I can do the following code on load, to perform client side code on the click event:
     
    btnCancelNCODiv.Attributes.Add("onclick", "hideDIVNCO(); return false;") 
     
    when I try to do something similar on the Ajax uploader control, I notice that attributes is not a known property for the ajax uploader control?  Basically, I don't a post back to occur when the file finishes uploading.
     
    Any Thoughts or suggestions?
     
    Thank you. 
     
     
    Eric:
    Hi mchamo,
     
    Please refer to http://cutesoft.net/forums/thread/65579.aspx , the highlighted code set the destination folder.
     
     void Uploader_FileUploaded(object sender, UploaderEventArgs args)
    {
    //Copys the uploaded file to a new location.
    args.CopyTo("c:\\temp\\"+args.FileName);
    //You can also open the uploaded file's data stream.
    //System.IO.Stream data = args.OpenStream();
    }
    You can write customization code and change "c:\\temp\\"+args.FileName to the actual file name based on your requirement.
     
    Thanks for asking
View Complete Thread