SPContext.ListId property
SharePoint 2013
Gets the GUID of the list that is associated with the Microsoft SharePoint Foundation context.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Gets the GUID of the list that is associated with the Microsoft SharePoint Foundation context.