using(SPSite mySite = new SPSite("mysite"))
{
using(SPWeb myWeb = mySite.OpenWeb())
{
SPList mycontactsList = myWeb.Lists["MyContacts"];
foreach (SPListItem contact in mycontactsList .Items)
{
string contactLastName = contact["Last Name"].ToString();
}
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment