Gunnar Peipman's ASP.NET blog

SharePoint: Half-Initialized Folders

I discovered something weird when trying to detect document library folder by URL. It is possible to create folder objects that are half initialized. I tried to ask folder by URL and I used URL of documents list view. The result - folder with correct name etc but many parameters were missing.

By example folder.Item returned me null. I got exception when I wanted to ask folder's unique ID. There were also many other parameters missing. But some parameters were correct. Somewhy I got half-initialized bastard instead of correct folder object I expected.

Solution was simple - when asking folder by URL you have to give same URL you can use to open the folder in Windows Explorer. Using these URL-s you get always correct folder objects from web object.

Posted: May 04 2008, 01:24 AM by DigiMortal | with 1 comment(s) |
Filed under:

Comments

Links (5/4/2008) « Steve Pietrek - Everything SharePoint said:

Pingback from  Links (5/4/2008) « Steve Pietrek - Everything SharePoint

# May 4, 2008 9:11 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)