I am trying to display ListItems in a gridview.
I can access the elements of the list.
using (SPSite site = new SPSite("http://mysitehere......")) { using (SPWeb web = site.OpenWeb()) { SPList list = web.Lists["TestList"]; ....... ....... } }
How to access list images?
The images in the list can be accessed with the following code:
SPListItemCollection listItems = list.Items; foreach (SPListItem listItem in listItems) { SPListItem item = list.GetItemById(listItem.ID); string imageUrl = item.Url; //use imageUrl to do whatever ... }