I have a SPList object and use SPList.Items to get the SPListItemCollection. From this collection I need to access one SPListItem for which the UniqueID or GUID is not know. Is it possible to access the element directly using Display Name or any other information (other than GUID or UniqueId). Any idea will be appreciated.
I have a SPList object and use SPList.Items to get the SPListItemCollection. From this
Share
Not out of the box – see the question How to access List Items in a list for the options. Retrieving the information with SPQuery is recommended to avoid placing too much load on the database. There is more information on how to use that in my answer to SharePoint : Check if item exists in a list, minimum overhead:
A good alternative is to use LINQ. This option has been provided by the community (Keith Dahlby and Wictor Wilén) and is available in the SharePoint Extensions Lib.