Retrieving TargetFolder from Web.config

3 posts, 1 answers
  1. Konstantinos
    Konstantinos avatar
    10 posts
    Member since:
    Sep 2011

    Posted 09 Jan 2012 Link to this post

    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. Answer
    Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 12 Jan 2012 Link to this post

    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 >>

  3. DevCraft banner
  4. Konstantinos
    Konstantinos avatar
    10 posts
    Member since:
    Sep 2011

    Posted 23 Jan 2012 Link to this post

    I went with overriding GetTargetFolder, thank you :)


    Konstantinos
Back to Top