SPWebEventReceiver.WebDeleted method
非同步After完全刪除現有的網站之後,就會發生的事件。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Overridable Sub WebDeleted ( _
properties As SPWebEventProperties _
)
'用途
Dim instance As SPWebEventReceiver
Dim properties As SPWebEventProperties
instance.WebDeleted(properties)
public virtual void WebDeleted(
SPWebEventProperties properties
)
參數
properties
Type: Microsoft.SharePoint.SPWebEventPropertiesSPWebEventProperties物件,代表事件處理常式的屬性。
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | properties是 null 。 |
備註
網站刪除事件發生在下列情況:
網站會透過使用者介面中刪除。
Microsoft SharePoint Foundation (例如SharePoint Designer) 透過遠端程序呼叫通訊協定 (RPC) 與相容的應用程式中刪除包含網站的資料夾。
透過分散式撰寫及版本處理 (DAV),會刪除包含網站的資料夾。
網站刪除事件只會發生在站台的鏈結中的第一個網站。例如,如果網站在http://TopSite/Site,都有子 web http://TopSite/Site/Subsite1和http://TopSite/Site/Subsite2,請刪除在中,只有一個刪除發生事件時,也就是http://TopSite/Site根網站。
注意
如果您嘗試存取已刪除的 Web 事件接收者使用properties.Web屬性,從WebDeleted(SPWebEventProperties)或SiteDeleted(SPWebEventProperties)方法,而不是簡單的a null reference (Nothing in Visual Basic)傳回,則會擲回System.IO.FileNotFoundException 。