I'm trying to get a list using it's ID, however it's not working and I can't work out why
This works without a problem...
using (SPSite site = new SPSite("http://example.org/sites/specific/staffhandbook"))
using (SPWeb web = site.OpenWeb())
{
SPList list = web.Lists["Documents"];
// process...
}
So should this, but it doesn't?
using (SPSite site = new SPSite("http://example.org/sites/specific/staffhandbook"))
using (SPWeb web = site.OpenWeb())
{
SPList list = web.Lists["29540646-bcab-4beb-8a91-648c1f3178b8"];
// process...
}