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

Invalid Characters In Folder Name

5 Answers 242 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Bryan Strader
Top achievements
Rank 2
Bryan Strader asked on 23 Nov 2010, 01:02 AM
I have been working on this for two days and cannot get passed this error message when working with the RadFileExplorer.
I have read almost every post I can find on this topic.
The issue is after setting the viewpaths and uploadpaths, the RadFileExplorer displays the data just find. But when I click on the refresh button, I get the error "Invalid Characters in Folder Name". I also get this error If I try to programmatically set the path after a click event somewhere else on the page. 

Do I need to set the initial path attribute? Any value I set seems to result in the same error. Please help me find a fix for this. I am using version 2010.2.836.35, but also tried version 2010.3.1109.35

My code is very similar to the example posted at this link:

http://www.telerik.com/support/kb/aspnet-ajax/fileexplorer/physical-paths-and-different-content-types.aspx

Any help is appreciated.

I have also tried the fix recommend here: http://www.telerik.com/community/forums/aspnet-ajax/file-explorer/change-initialpath-not-working.aspx

...but to no avail.....

5 Answers, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 24 Nov 2010, 05:10 PM
Hi Bryan,

This message appears when the path set to the InitialPath property  is invalid. You need to set the path in the same format as shown in the RadFileExplorers addressbar. For example, if we need to select the Doggies.jpg file (please refer to this screenshot), then you need to set the initial path as shown bellow:
RadFileExplorer1.InitialPath = "ROOT/Images/Nature/Animals/Doggies.jpg";

In the older versions, the wrong value does not throw any warning messages, but it is not working as well. In case of invalid path, the first item is selected.

I hope this helps.

All the best,
Fiko
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.
0
Bryan Strader
Top achievements
Rank 2
answered on 24 Nov 2010, 09:50 PM
Even using that format I still get the same result. Let me try to be more clear about my scenario.

When my page loads (A DNN Page), I set the paths dynamically based on a cookie, and everything works well here. I have a RadComboBox on the screen, that when changed fires code behind that dynamically changes the paths to where the file explorer should look.

The first problem is that after changing the paths in code behind, there is no command or line of code I have found that can "refresh" the file explorer so that it is displaying the newly set paths. (I did try TreeView.Nodes.Clear() with no luck).

The second issue is that if I click the "refresh" button after the paths change, the refresh happens but it throws the "Invalid Characters in Folder Name" error. Once I click ok on the error it goes away until the next time the code tries to reset the path.

To make this work, I store the path in a cookie and redirect myself to the same page. (not ideal but is working and without errors)

To me it seems as if there is some property of the RadFileExplorer control that is not being set, thus throwing the error before correcting itself.

I have tried many different values and formats for the initial path, but nothing seems to make this error message go away.
0
Fiko
Telerik team
answered on 29 Nov 2010, 01:14 PM
Hi Bryan,

The Page_Load event is the latest one, where you can set the paths properties of the RadFileExplorer control. You set the properties after that event and this is the reason for the unexpected behavior in your case. Could you please check the solution provided in the last post in this thread? I believe that it will be of help for you in order to implement the desired scenario.

Regards,
Fiko
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.
0
Barry
Top achievements
Rank 1
answered on 18 Dec 2011, 05:35 PM
Hi,

I have a similar situation; where the value needs to be set in a later event  than Page_Load. In may case the page is only available to be (in user control) at DataBind.

 Is there any other workaround to this solution?

Thanks,
Barry
0
Marin Bratanov
Telerik team
answered on 21 Dec 2011, 12:36 PM
Hello Barry,

I am sorry to say that Page_Load is still the last event where such properties can be set and the closest workaround is what is demonstrated in the other thread's attachment. You could try using a session variable instead of the combobox value, yet the approach needs to use this event, for example after a postback or an AJAX request.


Greetings,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
FileExplorer
Asked by
Bryan Strader
Top achievements
Rank 2
Answers by
Fiko
Telerik team
Bryan Strader
Top achievements
Rank 2
Barry
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or