I need to list out the Custom list and library from SharePoint Site? How to identify the content is comes under the custom created?
+1
A:
Below code should help you
SPList myList=SPContext.Current.Web.Lists["YourList"];
if (myList.BaseType == SPBaseType.DocumentLibrary)
{
//My List is Document Library
}
if (myList.BaseType == SPBaseType.GenericList)
{
//My List is Custom List
}
Kusek
2010-08-05 13:34:31
i tried to get the current web using client object model.i am not able to get that..please guide me to find itClientContext context = new ClientContext(ApplicationContext.Current.Url);ithis is available in net.. but its not working
Ayyappan.Anbalagan
2010-08-06 07:23:20