The Below is the Sample Code to update the Sharepoint list content programmatically by using SharePoint Object Model.
SPSite Site = new SPSite(“http://localhost:21000″);
SPWeb Web = Site.OpenWeb();
SPList List = Web.Lists["Address Book"];
SPListItem ListItem = List.GetItemById(0);
string FullName = string.Empty;
FullName = ListItem["FirstName"].ToString() + ListItem["LastName"].ToString();
SPListItem["FullName"] = FullName;
ListItem.Update();



November 5, 2009 at 9:34 am |
This needs user name & password. how can we pass user credential through code