This is a migrated thread and some comments may be shown as answers.
Change target folder client side?
1 Answer 15 Views
This is a migrated thread and some comments may be shown as answers.
Mathew
Top achievements
Rank 1
Mathew asked on 31 Aug 2012, 11:17 AM
Hi,

Is it possible to change the target folder from the client side?  I have a combobox with a list of possible folders, and when the selection is changed, I want to change the target folder for the upload.

function OnClientSelectedIndexChanged(sender, eventArgs) {
      var item = eventArgs.get_item();
      var upload = $find("<%= RadAsyncUpload1.ClientID %>");
      upload.TargetPath = ???
      alert("You selected " + item.get_text());
}


Alternatively, is it possible to do this on the server side before the files are moved from the temporary directory to the target directory?  I can obviously change the value in a postback, but the upload appears to be happening before my event is called.

Any help would be appreciated.

Thanks,
Mathew

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 05 Sep 2012, 08:55 AM
Hi Mathew,

 
One way to achieve this scenario is to use the PostbackTriggers property of RadAsyncUpload that determines which Postback will upload the files. I am attaching a sample test project that reproduces it.

Hope this will be helpful.

Kind regards,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Asked by
Mathew
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or