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

Programatically changing Radupload control service url and target folder

1 Answer 204 Views
Upload
This is a migrated thread and some comments may be shown as answers.
anirudha
Top achievements
Rank 1
anirudha asked on 23 Mar 2009, 12:00 PM
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?

Thanks
Anirudha Deshpande
Smooth Seas Does not Make Skillful Sailors

 

1 Answer, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 24 Mar 2009, 10:11 AM
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:
[ScriptableMember]  
public string TargetFolder { getset; }  
[ScriptableMember]  
public string TargetPhysicalFolder { getset; }  
[ScriptableMember]  
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,
Ivan
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Upload
Asked by
anirudha
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Share this question
or