SPList spList = spWeb.Lists["Announcements"];
SPListItem spListItem = spList.Items.Add();
spListItem["Title"] = "Hello world";
spListItem.Update();
int RowID = spListItem.ID; //This is the ID of the new item.
SPListItem spListItem = spList.Items.Add();
spListItem["Title"] = "Hello world";
spListItem.Update();
int RowID = spListItem.ID; //This is the ID of the new item.
No comments:
Post a Comment