Query Images by ItemDefaultUrl?

Posted by Community Admin on 04-Aug-2018 03:06

Query Images by ItemDefaultUrl?

All Replies

Posted by Community Admin on 20-Mar-2013 00:00

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());

Posted by Community Admin on 20-Mar-2013 00:00

Guess it's easier than I thought, no .Value needed (for anyone else trying it)

Posted by Community Admin on 22-Mar-2013 00:00

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

This thread is closed