foreach (SPWeb childweb in web.Webs)
{
childweb.AllowUnsafeUpdates = true;
SPList PagesLIST = childweb.Lists["Pages"];
if (PagesLIST.Items.Count != 0)
{
for (int p = 0; p < PagesLIST.Items.Count; p++)
{
if (p == PagesLIST.Items.Count)
{ p = -1; continue; }
PagesLIST.Items[p].Delete();
}
}
PagesLIST.Update();
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment