Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. public override void ItemAdded(SPItemEventProperties properties)
  2. {
  3. base.ItemAdded(properties);
  4. SPSecurity.RunWithElevatedPrivileges(delegate()
  5. {
  6. using (SPSite site = new SPSite(properties.Web.Site.ID))
  7. {
  8.  
  9. using (SPWeb spCurrentSite = site.OpenWeb(properties.Web.ID))
  10. {
  11.  
  12. public override void ItemAdded(SPItemEventProperties properties)
  13. {
  14. base.ItemAdded(properties);
  15. SPSecurity.RunWithElevatedPrivileges(delegate()
  16. {
  17. using (SPSite site = new SPSite(properties.siteID))
  18. {
  19.  
  20. string currenweburl = properties.RelativeWebUrl;
  21.  
  22. using (SPWeb spCurrentSite = site.OpenWeb(currentweburl))
  23. {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement