WebPartDefinition.MoveWebPartTo 方法
將網頁組件移到網頁組件頁面上的不同位置。
命名空間: Microsoft.SharePoint.Client.WebParts
組件: Microsoft.SharePoint.Client.Silverlight (在 Microsoft.SharePoint.Client.Silverlight.dll 中); Microsoft.SharePoint.Client.Phone (在 Microsoft.SharePoint.Client.Phone.dll 中) Microsoft.SharePoint.Client (在 Microsoft.SharePoint.Client.dll 中)
語法
'宣告
Public Sub MoveWebPartTo ( _
zoneID As String, _
zoneIndex As Integer _
)
'用途
Dim instance As WebPartDefinition
Dim zoneID As String
Dim zoneIndex As Integer
instance.MoveWebPartTo(zoneID, zoneIndex)
public void MoveWebPartTo(
string zoneID,
int zoneIndex
)
參數
zoneID
類型:System.String您要移動網頁組件的網頁組件區域的名稱。
每個網頁組件區域必須具有唯一的名稱。它不能null 參考 (未執行任何動作 於 Visual Basic 中)。它必須不是空的。其長度必須等於或小於 64。
zoneIndex
類型:System.Int32網頁組件區域的索引,指定的網頁組件會要移動的目的地網頁組件區域內的位置。
ZoneIndex 參數,此方法需要遵循的 LimitedWebPartManager.AddWebPart zoneIndex 參數相同的行為。
LimitedWebPartManager.AddWebPart.method zoneIndex 參數是一個網頁組件區域索引,指定的網頁組件會插入網頁組件區域內的位置。直接在現有的網頁組件具有最低的網頁組件區域索引大於或等於 zoneIndex 之前,必須被插入新的網頁組件。如果 zoneIndex 大於區域中的所有網頁組件的索引,或在網頁組件區域中有任何網頁組件,必須是在網頁組件區域結尾處插入新的網頁組件。值必須等於或大於 0。
備註
如果目前的使用者不具有修改網頁組件的權限,伺服器必須略過這個方法通話。