hello,
I need to get the links of lists[Document,pictures,lists,library,survey] every things,how i will get this?
thanks
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
vamsi charanPosted Dec 9, 2013, 7:02 AM
public void AccessListsAndLibraries()
{
using(SPSite site = new SPSite("[Site Collection URL]"))
{
using(SPWeb web = site.openweb())
{
foreach(SPList list in web.Lists)
{
Console.writeline("List Name : {0} and its url is : {1}",list.Title,list.url)
}
}
}
}
Note: The credentials under which console application is running should be having permission to site and the site collection data base to enumerate to all lists with in the site.
Regards,
Vamsi Charan.