-
- using(SPSite oSite = new SPSite("Your Site Url")) {
-
- using(SPWeb oWeb = oSite.RootWeb) {
-
- SPList oList = oWeb.Lists["Your List name"];
-
- listItemId = 1;
-
- SPListItem itemToUpdate = list.GetItemById(listItemId);
- itemToUpdate["Employee Name"] = "Adam Smith";
- itemToUpdate.Update();
- }
- }
Here I have update Employee name in 1st ID.