If I am returning items from a SharePoint list is there anyway that I can store the values in an array or a list to use them in an ASP Repeater? I would have 4 values that would need to be stored (the List has 4 columns) and random numbers of records (rows) that would be returned. Is there any way to accomplish this?
using (SPSite site = new SPSite("MYSITE"))
using (SPWeb oWebsiteRoot = site.OpenWeb())
{
SPList oList = oWebsiteRoot.Lists["SInfo"];
SPListItemCollection items = oList.Items;
foreach (SPListItem listitem in items)
{
//ADD 4 Items to an array or List
}
}