Posts

Showing posts with the label Why to use Run With Elivete Privillage in Sharepoint 2010 and sharepoint2013

Using runwithelivatedprivilages and using delegates

SPSecurity.RunWithElevatedPrivileges( delegate ()               {                   using   ( SPSite  site =  new   SPSite ( SPContext.Current.Site.Url ))                   {                       using   ( SPWeb  web = site.OpenWeb())                       {                           SPList   LstPicture  = web.Lists[ "......" ];                 ...