Getting the full url of a Document Library from SPList object

Might save you a couple of minutes.
To get the full url of a document library's default view, you can do something like below:

(assuming list is a SPList object for the document library)

list.ParentWeb.URL + "/" + list.DefaultView.Url

Do note that if you you use ParentWebUrl or DefaultViewUrl properties of SPList object, you would not get the same results as these properties return server relative URLs.

Comments

Popular posts from this blog

PowerApps Form for SharePoint and Access Denied Errors

Prevent site owners from creating subsites in SharePoint 2010

Getting Page Field Value in custom publishing page layout