Tagged Questions
2
votes
1answer
85 views
Will using a `SPList` object derived from a disposed `.OpenWeb()` cause errors?
Will using a SPList object derived from a disposed .OpenWeb() cause errors?
SPList list = null;
using (SPWeb web = SPContext.Current.Site.OpenWeb("/myweb")){
list = web.Lists["Awesome Name"];
}
...
0
votes
1answer
334 views
Proper use of SPWeb from SPContext for pulling lists
So, after about two hours on the subject I am thoroughly confused. There are viewpoints all over the place on how, when, and why to use Dispose() on SPWeb objects as they relate to SPContext.
Can ...