using (SPWeb web = SPContext.Current.Web)
{
...
}
You will get a nice "Trying to use an SPWeb object that has been closed or disposed and is no longer valid" because you are disposing an object you really didnt create.
Best practices here.
Hello, my name is Pedro Mateus and 'Ponto de Partilha' is 'SharePoint' roughly translated to Portuguese. Since i started with SharePoint and .NET i have found great resources that helped me, this is a way to give to the community something back in return, and keep some sort of a log of stuff i do.
No comments:
Post a Comment