PublishingPage.Description: is there a pendant for Documents in Document Library?
-
16-02-2021 - |
Question
I use the Description property of PublishingPages (located in the pages library of a website) to display information about a page.
Is there a pendant for a document (located in the documents library of a website), which a user can edit? Or do I have to define my own site column, named "document description", to achieve this?
Solution
The 'Document' content type have by default "Title" and "Name" Columns only. You need to add a site column for description. A document, in general, is represented by SPFile object. So you can use SPFile.Item["document description"] to get the description of the document in code.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow