The following code snippet is used to retrieve the list of document libraries.
SPWeb _web = SPContext.Current.Web;
SPListCollection ListColl = _web.Lists;
foreach (SPList _lst in ListColl)
{
if (_lst.BaseTemplate == SPListTemplateType.DocumentLibrary)
{
LibList.Items.Add(_lst.Title);
}
}
BaseTemplateType can be used to identify the Type of list.
Leave a Reply