Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

SPWeb.Title property

Gets or sets the title for the website.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
[ClientCallableAttribute]
[ClientCallableConstraintAttribute(Type = ClientCallableConstraintType.MaxLength, Value = )]
public string Title { get; set; }

Property value

Type: System.String
A string that contains the title.

The value that is returned can vary depending on the current thread's Thread.CurrentUICulture property. For more information, see the TitleResource property.

The following code example uses the Title property to change the title of a specified website in the current site collection.

using(SPWeb oWebsite = SPContext.Current.Site.OpenWeb("Website_URL"))
{
    oWebsite.Title = "New Website Name";
    oWebsite.Update();
}
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.