Check for the specified list exists
AllowUnsafeUpdates
urrentWeb.AllowUnsafeUpdates = true;
if (IsListExists(strListName, currentWeb) == true)
{
SPList lst = currentWeb.Lists["Employee"];
currentWeb.Lists.Delete(lst.ID);
}
currentWeb.AllowUnsafeUpdates = false;
AllowUnsafeUpdates
urrentWeb.AllowUnsafeUpdates = true;
if (IsListExists(strListName, currentWeb) == true)
{
SPList lst = currentWeb.Lists["Employee"];
currentWeb.Lists.Delete(lst.ID);
}
currentWeb.AllowUnsafeUpdates = false;
No comments:
Post a Comment