Quantcast
Viewing all articles
Browse latest Browse all 25064

Event receiver - SPFolder exists

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 25064

Trending Articles



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