Sharepoint.Dev() Just another SharePoint weblog

13Apr/090

Verificando se existe SPWeb

Segue um método simples e rápido que faz uma verificação se existe um SPWeb em um SPWebCollection()

private bool ChildWebExists(SPWeb parentWeb, string childWebName)
{
    using(SPweb childWeb = parentWeb.Webs[childWebName])
    {
      return childWeb.Exists;
    }
}
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.