More in this section

Forums / Developing with Sitefinity / Getting a single Library Item

Getting a single Library Item

2 posts, 0 answered
  1. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    26 Apr 2010
    Link to this post
    Can someone point me at the doc which tells me how to get a single library item?  The only way I can figureout how is to do a foreach on GetItems() and match the ID...

    Is there an easier way?

    Steve
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    26 Apr 2010
    Link to this post
    Hi Steve,

    You can get the content by using GetContent method Finding content items. There is no overload where you could pass the content item name or other parameter. You could create a helper method where you extract the ID and match the file by other criteria.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
2 posts, 0 answered