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 ------------------------------------------------------------------------------...
-
Category : Admin Backup : For site collection backup : stsadm.exe -o backup -url -filename [-overwrite] For catastrophic backup: sts...
-
SharePoint went through a major overhaul in capabiltiy, ease of use, ease of administration, and ease of integration. This comparison of Sha...
-
Go to Tools-->Form options in infopath form menu Select Security and Trust Category Unselect Automatically determine security level(recom...
No comments:
Post a Comment