tags:

views:

24

answers:

1

I'm trying to display the ListItems in a gridview.

I am able to access the list items.

using (SPSite site = new SPSite("http://mysitehere......")) { using (SPWeb web = site.OpenWeb()) { SPList list = web.Lists["TestList"]; ....... ....... } }

Please help me in accessing the list images.

+1  A: 

The list images can be access by using code such as the following:

 SPListItemCollection listItems = list.Items;

 foreach (SPListItem listItem in listItems)
 {
     SPListItem item = list.GetItemById(listItem.ID);
     string imageUrl = item.Url; //use imageUrl to do whatever ...
 }
Daniel Pollard