Programatically changing Radupload control service url and target folder

2 posts, 0 answers
  1. anirudha
    anirudha avatar
    17 posts
    Member since:
    Jan 2009

    Posted 23 Mar 2009 Link to this post

    Hi All,

    i am trying to change the Upload service URL and target folder property of RADUpload control programatically in order to work locally as well as after deployment on server as below.


    Uri ServiceURL = new Uri(Application.Current.Host.Source, "../RadUploadHandler.ashx");



    this.fileUpload.UploadServiceUrl = ServiceURL.ToString();



    Uri Upload = new Uri(Application.Current.Host.Source, "../UserUploads");



    this.fileUpload.TargetFolder = Upload.ToString();

    but don't know why it's not taking the new path after deployment to server ,it still continues to point my local m/c path only.

    Anyone could please let me know how to achieve this?

    Anirudha Deshpande
    Smooth Seas Does not Make Skillful Sailors


  2. Ivan
    Ivan avatar
    519 posts

    Posted 24 Mar 2009 Link to this post

    Hello Anirudha,

    Thank you for your interest in the RadUpload control.

    I reviewed your code and noticed that you are trying to assign a value of type Uri to a property of type String:
    public string TargetFolder { getset; }  
    public string TargetPhysicalFolder { getset; }  
    public string UploadServiceUrl { getset; } 

    I prepared an example application for you in which two upload handlers  with two different target folders are demonstrated. Please take a look at the example and let me know if you have more questions.

    Kind regards,
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Back to Top