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

FileExplorer with multiple FTP configurations

1 Answer 25 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 2
Marco asked on 16 Jul 2014, 12:47 PM
Hi to all,

I would like to use the RadFileExplorer to connect to multiple FTP servers, the goal is to select in a RadDropDownList a previously configured FTP info from a database (FTP Server, Username, UserPassword) and then open the RadFileExplorer in a RadWindow with the selected RadDropDownList  values, and then pass to the server side or to a hidden the selected file path.

It is posible to change the RadFileExplorer values in the codebehind? Do i need to use always a "FtpSettings.config" file?

I have sean this example but as i understand it only use the .config file:

Thanks in advance.

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 21 Jul 2014, 10:18 AM
Hi Marco,

The content provider form the above mentioned article is using a config file as an example the information is loaded in the following method:
private void ReadConfiguration()
    _protocolAndServer = VirtualPathUtility.RemoveTrailingSlash(ConfigurationManager.AppSettings["FtpServerName"]);
    _userName = ConfigurationManager.AppSettings["UserName"];
    _password = ConfigurationManager.AppSettings["Password"];
    _tempDirectory = Context.Server.MapPath(VirtualPathUtility.AppendTrailingSlash(ConfigurationManager.AppSettings["TempDirectoryPath"]));// Use the physical path
    _itemHandlerPath = ConfigurationManager.AppSettings["ItemHandlerPath"].Replace("~/", "");// Remove the starting "~/"

and you can modify it to load the information as you want - in your particular case you can change this method to load dynamically settings based on a dropdown and you can access the dropdown on the page through the HttpContext object, e.g.:
Page _pageContainsRadFileExplorer = HttpContext.Current.Handler as Page
var dd = _pageContainsRadFileExplorer.FindControl("ConfigDD") as DropDownList


Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Asked by
Top achievements
Rank 2
Answers by
Telerik team
Share this question