RadFileExplorer Opening files with special characters in the file name

2 posts, 0 answers
  1. Bryan Strader
    Bryan Strader avatar
    27 posts
    Member since:
    Sep 2009

    Posted 02 Dec 2010 Link to this post

    I have implemented a solution that uses the RadFileExplorer and CustomFileSystemProvider similar to what is in this post:


    My issue is that when I try to open a file that has a number sign in the file name, the URL path that is passed to the FileSystemHandler.ashx is poorly formed, and loses everything after the first '#' character. I don't expect to see these kinds of characters in our file names, but this one was a valid file and breaks the FileSystemHandler.ashx at the response.write, because the path to the file is invalid.

    Is there a way to intercept this file path URL and ensure that it stays well formed. I noticed in the OnClientFileOpen client event, the url looks fine, so checking it here doesn't help. It isn't until its passed to the handler code that it is missing data....
  2. Fiko
    Fiko avatar
    1406 posts

    Posted 08 Dec 2010 Link to this post

    Hello Bryan,

    You have to make sure that the URL is encoded. On the server you can use this method in order to encode the string.
    If you need to encode the URL on the client, then you can use the escape JavaScript method in order to get the encoded URL.

    In both cases, you can use the UrlDecode method in order to retrieve the actual URL on the server

    the Telerik team
    Browse the vast support resources we have to jumpstart 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.
Back to Top