SPWeb.Title property
取得或設定網站的標題。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
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; }
Property value
Type: System.String
字串,包含標題。
備註
傳回的值視目前的執行緒Thread.CurrentUICulture屬性。如需詳細資訊,請參閱TitleResource屬性。
Examples
下列程式碼範例會使用Title屬性,來變更目前的網站集合中指定網站的標題。
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();
}