Hi,
I am trying to update all items of a list with a value.
I am using this code
SPList list = web.Lists["008"];
for (int i = 0; i < list.ItemCount; i++)
{
SPListItem itemToAdd = list.Items.GetItemById(i);
itemToAdd["Seat Time"] = "45Min";
itemToAdd.Update();
} But this code gives error at list.items.getelementbyid(i);
But when i give the Id as shown in list (6 or 7) then it updates the list.
How could i solve this error?