SPWeb.Update Method
Updates the database with changes that are made to the website.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
The following code example uses the Update method to change the title of a specified site in the current site collection.
using (SPWeb oWebsite = SPContext.Current.Site.OpenWeb("Website_URL")) { oWebsite.Title = "My New Title"; oWebsite.Update(); }
Note |
|---|
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. |
Note