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

How to get the physical path of RAD file explorer

1 Answer 249 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
sandhya
Top achievements
Rank 1
sandhya asked on 30 May 2011, 11:12 AM
Hi,

Please can you tell me how to get the physical path of the file uploaded using file explorer.
For ex : I uploaded suppose qwerty.html .The uploaded file stored in in this phyical path  c:/content/content/Hospital1/qwerty.html
virtual path is /Content/folder1/Folder2/Qertyy.html.

Now same file if i want to download i need phyical path i.e c:/content/content/Hospital1/qwerty.html
How can i get this using fileexplorer.?

Please post the working demo example.
dont send any links for checking .i alredy checked all those links.

Thanks
Bhavani

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 02 Jun 2011, 07:13 AM
Hi Bhavani,

You can use Server.MapPath in order to retrieve the in order to get the physical paths (for example: Server.MapPath("~/App_Data/ExampleVirtualPath")).

Here is the requested example:

Default.aspx:
<telerik:RadFileExplorer ID="FileExplorer1" runat="server"
            onitemcommand="FileExplorer1_ItemCommand">
    <Configuration ViewPaths="~/images" UploadPaths="~/images" />
</telerik:RadFileExplorer>

Default.aspx.cs
protected void FileExplorer1_ItemCommand(object sender, Telerik.Web.UI.RadFileExplorerEventArgs e)
{
    switch (e.Command)
    {
        case "UploadFile":
            Response.Write(Server.MapPath(e.Path));
        break;
         
    }
}


Best regards,
Rumen
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
FileExplorer
Asked by
sandhya
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or