Programatically setting TempDirectory ?

  •  07-25-2011, 8:53 AM

    Programatically setting TempDirectory ?

    Dynamically setting the TempDirectory in the code behind does not work?
     
      this.Uploader1.TempDirectory = "~/temp/U1/T"; 
     instead of in the aspx page as TempDirectory="~/temp/U1/Tx"
     
    The temp directory will vary depending on the users login. It needs to be set dynamically in code? 
     
    http://ajaxuploader.com/document/index.htm#page=BeforeYouBegin.htm
     
    I tried just setting the tempdirectory on the server in pre-render  with no luck.
    I also tried to dynamically create the entire instance of the control but it failed to perform an upload because of not being able to load jquery?
     
       CuteWebUI.Uploader up = new Uploader();
                   up.TempDirectory = "~/temp/U1/T";
                   up.ID = "Uploader2";
                   up.CancelButtonID = "Uploader2Cancel";
                   up.ShowProgressBar = false;
                   up.ShowProgressInfo = false;
                   up.FileTooLargeMsg = "File is too large!";
                   up.MultipleFilesUpload = true;
                   up.UploadCompleted += new UploaderBatchEventHandler(Uploader1_UploadCompleted);
                   divUpload.Controls.Add(up);
    Any suggestions? - Thanks! 
View Complete Thread