|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
Returns the list that is associated with the specified server-relative URL.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
When you call the GetList method using the full URL for a list that does not exist, a FileNotFoundException is thrown and the value of the AllowUnsafeUpdates property changes to false.
Use the GetListFromWebPartPageUrl method to return the list that is associated with the first Web Part in a Web Part page.