Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Event receiver - SPFolder exists

$
0
0

sorry for the trivial question.

How i to do to verify if SPfolder exist if when i insert the url of the folder that i must create i get the error "Value does not fall within the expected range." because the folder still not exist

Example: 

SPFolder link = properties.Web.Folders[urlSiteCollection + myprincipalfolder].SubFolders[NEWFOLDER] (GET ERROR)

if (!link.Exists)
{
           ...
}


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>