Timeline for When to use OpenWeb() vs RootWeb
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 13, 2011 at 6:46 | comment | added | Bernd Rickenberg | You can find more information on the topic why you should not use SPSite.RootWeb in a using statement here: blogs.msdn.com/b/rogerla/archive/2008/10/04/… | |
Aug 12, 2011 at 16:16 | comment | added | Rob D'Oria | You could, but I would probably check to see if the Url I used to create the SPSite object equals SPSite.RootWeb.Url first...if it doesn't then go with OpenWeb()...it it does then use RootWeb. | |
Aug 12, 2011 at 16:08 | comment | added | Meyer Denney | What is you are creating a workflow and you don't know if it will be the main site or a subsite. Would it be wise to always go with example two in that case? | |
Aug 12, 2011 at 15:53 | vote | accept | Meyer Denney | ||
Aug 11, 2011 at 23:49 | history | answered | Rob D'Oria | CC BY-SA 3.0 |