SPSecurity.RunWithElevatedPrivileges(delegate() {
oWeb.AllowUnsafeUpdates = true; SPList oList = oWeb.Lists[sRequestList]; SPListItem oVoucher = oList.GetItemById(Convert.ToInt32(Request.QueryString["RequestNo"])); oVoucher.Delete();
oList.Update(); oWeb.AllowUnsafeUpdates = false;
});
Showing posts with label sharepoint list. Show all posts
Showing posts with label sharepoint list. Show all posts
Saturday, 25 April 2015
Delete list item programmatically by id
Labels:
c#,
delete item,
sharepoint list

Subscribe to:
Posts (Atom)