SPWeb.Update method

Updates the database with changes that are made to the website.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

'Declaration
Public Sub Update
'Usage
Dim instance As SPWeb

instance.Update()

If the value of any of the properties of the SPWeb object has changed, this method saves the values of all properties to the database.

The following code example uses the Update method to change the title of a specified site in the current site collection.

Using webSite As SPWeb = SPContext.Current.Site.OpenWeb("Site_Name")
    webSite.Title = "New_Site_Name"
    webSite.Update()
End Using
NoteNote

Certain objects implement the IDisposable interface, and you must avoid retaining these objects in memory after they are no longer needed. For information about good coding practices, see Disposing Objects.

Show: