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

Forced Download

1 Answer 83 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Thomas asked on 13 Aug 2010, 03:39 AM

When using FileExplorer control, I would like to force a download of any files double clicked on, regardless of the type.  I believe the following code (which I took from the sample code) should do the trick:




<script type="text/javascript">















function OnClientFileOpen(oExplorer, args) {




var item = args.get_item();












var requestImage = "Handler.ashx?path=" + item.get_url();


document.location = requestImage;


















<telerik:RadFileExplorer ID="fileExplorer" runat="server" Width="700px" OnClientFileOpen="OnClientFileOpen" EnableOpenFile="true" TreePaneWidth="250px">




<Configuration SearchPatterns="*.*" MaxUploadFileSize="20480000"></Configuration>






However, I get the error message that Handler.ashx doesn't exists.

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 18 Aug 2010, 11:58 AM
Hello Thomas,

If you have RadControls for ASP.NET AJAX installed on your machine, then the Handler.ashx file is located in the "C:\Program Files (x86)\Telerik\RadControls for ASP.NET AJAX <VERSION>\Live Demos\FileExplorer\Examples\FilterAndDownloadFiles" folder.

For your convenience I have attached it to this thread as well.

I hope this helps.

the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question