im trying to limit the images im looping within a media folder...
i have tried this but its still returning all logos not stopping at 18....
foreach (var item in MediaFolder.Descendants()) { if (item.name == "Client Logos") // its a client logos folder { foreach (var mediaImage in item.Children.Take(18)) // get 18 logos {
int i = '';
foreach (var item in MediaFolder.Descendants())
{
if (item.name == "Client Logos") // its a client logos folder
{
foreach (var mediaImage in item.Children)
{
i++
if(i < 19){
//enter code here
}
limiting items in foreach loop
im trying to limit the images im looping within a media folder...
i have tried this but its still returning all logos not stopping at 18....
Hi Mark
How about this
Does that work?
/Jan
is working on a reply...