Never use SPList.Items.Add because this approach gets all items in the list before adding a new SPListItem. Use the following method instead, which does not preload the list items: 1: /// <summary> 2: /// More efficient way of adding an item to a list. 3: /// </summary> 4: /// <remarks> 5: /// GetItems with a [...]
Archive for February, 2009
Efficient way to add a new item to a SharePoint list
Posted in Everything, Software Development, tagged Microsoft SharePoint on February 25, 2009 | 14 Comments »
SharePoint Development Best Practices (Summary)
Posted in Everything, Software Development, tagged Microsoft SharePoint on February 20, 2009 | 8 Comments »
I’ve read several blog posts of late regarding best practices for developing SharePoint API based components. Some developers are aware of issues surrounding disposal of SPSite and SPWeb objects and the use of SPList Item collections, and some are not. The simple fact is the SharePoint API is not intuitive when it comes usage of [...]
