Sunday 28 August 2011

Add a new list item in Sharepoint 2010


Add new list item in Sharepoint 2010 using Object Model -
SPWeb mySite = SPContext.Current.Web;
SPListItemCollection listItems = mySite.Lists["ListName"].Items;

SPListItem item = listItems.Add();

item["Title"] = "xyz";
item.Update();

Add new list item in Sharepoint 2010 using Ecmascript -

See the Post Add\Delete\Retrieve List items using Javascript Client object model SharePoint 2010

Ads by Google

No comments:

Post a Comment