Updates the database with changes that are made to the list.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Visual Basic (Declaration)
Dim instance As SPList
instance.Update
The following code example uses the Update method to modify several properties for a list.
Dim webSite As SPWeb = SPContext.Current.Web
Try
Dim list As SPList = webSite.Lists("List_Name")
list.EnableAttachments = True
list.EnableModeration = True
list.Hidden = True
list.Update()
Finally
webSite.Dispose()
End Try
SPWeb oWebsite = SPContext.Current.Web;
SPList oList = oWebsite.Lists["List_Name"];
oList.EnableAttachments = true;
oList.EnableModeration = true;
oList.Hidden = true;
oList.Update();