using (SPWeb web =SPContext.Current.Site.OpenWeb())
{
SPList Projectimages = web.Lists["ProjectPictures"];
SPQuery myQuery = new SPQuery();
SPListItemCollection Items = Projectimages.GetItems(myQuery)
}
If we use Using(){} it will automatically dispose all objects.
We need to declare and use all SPObjects in Using clause
Subscribe to:
Post Comments (Atom)
Content Editor Webpart not showing up in SharePoint Online ------------------------------------------------------------------------------...
-
Content Editor Webpart not showing up in SharePoint Online ------------------------------------------------------------------------------...
-
Ribbon missing in Share point online Pages to add custom web part : --------------------------------------------------------------------...
-
Regarding “SharePoint Foundation” and “SharePoint Server 2010”, the important thing to understand is that SharePoint Foundation is the found...
No comments:
Post a Comment