SPWeb.Title 属性

Gets or sets the title for the website.

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public Property Title As String
    Get
    Set
用法
Dim instance As SPWeb
Dim value As String

value = instance.Title

instance.Title = value
public string Title { get; set; }

属性值

类型: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 webSite As SPWeb = SPContext.Current.Site.OpenWeb("Website_URL")
    webSite.Title = "New_Site_Name"

    webSite.Update()
End Using
using(SPWeb oWebsite = SPContext.Current.Site.OpenWeb("Website_URL"))
{
    oWebsite.Title = "New Website Name";
    oWebsite.Update();
}

另请参阅

引用

SPWeb 类

SPWeb 成员

Microsoft.SharePoint 命名空间

TitleResource