1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Query Images by ItemDefaultUrl?

Query Images by ItemDefaultUrl?

3 posts, 0 answered
  1. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    20 Mar 2013
    Link to this post
    Every linq query I try to do against ItemDefaultUrl results in this error

    'System.String Value' is not defined for type 'System.String'

    I've tried various versions of this, but always the same error
    ...any idea?
    LibrariesManager manager = LibrariesManager.GetManager();
    var defaultImages = manager.GetImages().FirstOrDefault(x => x.ItemDefaultUrl.Value.ToString().ToLower() == defaultConfigImage.ImageUrl.ToLower());

  2. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    20 Mar 2013 in reply to Steve
    Link to this post
    Guess it's easier than I thought, no .Value needed (for anyone else trying it)
  3. Stefani Tacheva
    Stefani Tacheva avatar
    718 posts
    Registered:
    31 May 2017
    22 Mar 2013
    Link to this post
    Hi Steve,

    Thank you for sharing the information with the community.

    Kind regards,
    Stefani Tacheva
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
3 posts, 0 answered