This is a migrated thread and some comments may be shown as answers.

Retrieving TargetFolder from Web.config

2 Answers 39 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Konstantinos
Top achievements
Rank 1
Konstantinos asked on 09 Jan 2012, 05:14 PM
Dear Sir/Madam

Is there a way to set the value of TargetFolder or TargetPhysicalFolder inside MainPage.xaml to a value retrieved from Web.config ?

This could be useful in order to set the path in a key inside Web.config and then have the .xaml file retrieve the value of that key.

Thank you.


Kind Regards,
Konstantinos

2 Answers, 1 is accepted

Sort by
0
Accepted
Tina Stancheva
Telerik team
answered on 12 Jan 2012, 01:10 PM
Hi Konstantinos,

You can pass InitParameters to the Silverlight object and use these parameters to take the path for the TargetFolder from the web.config configuration file. However, I believe that in your case it might be better to override the GetTargetFolder() method in the UploadHandler implementation (read more). This will allow you to set the path of the target folder on the server.

Give this a try and let me know if it helps.

Greetings,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Konstantinos
Top achievements
Rank 1
answered on 23 Jan 2012, 11:31 AM
I went with overriding GetTargetFolder, thank you :)


Konstantinos
Tags
Upload
Asked by
Konstantinos
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Konstantinos
Top achievements
Rank 1
Share this question
or