SqlPersonalizationProvider.ResetPersonalizationBlob 方法

定義

刪除基礎資料存放區中的個人化資料。

protected:
 override void ResetPersonalizationBlob(System::Web::UI::WebControls::WebParts::WebPartManager ^ webPartManager, System::String ^ path, System::String ^ userName);
protected override void ResetPersonalizationBlob (System.Web.UI.WebControls.WebParts.WebPartManager webPartManager, string path, string userName);
override this.ResetPersonalizationBlob : System.Web.UI.WebControls.WebParts.WebPartManager * string * string -> unit
Protected Overrides Sub ResetPersonalizationBlob (webPartManager As WebPartManager, path As String, userName As String)

參數

webPartManager
WebPartManager

WebPartManager,管理個人化資料。

path
String

個人化資訊的路徑,此個人化資訊在 Shared 範圍中做為擷取金鑰之用。

userName
String

個人化資訊的使用者名稱,此個人化資訊在 User 範圍中做為擷取金鑰之用。

備註

WebPartPersonalization當網站使用者選擇在頁面上重設Web 組件資料時,會使用這個方法來刪除資料庫中的個人化資料。 如果 username 為非 null ,則會刪除具有 User 範圍資料的資料,否則會刪除具有 Shared 範圍的資料。

每當使用者特定的個人化資料從頁面要求內容中的資料庫刪除時,物件 SqlPersonalizationProvider 就會自動更新 LastActivityDate aspnet_Users 資料表中的資料行。 此行為可讓其他 ASP.NET 功能在管理過時的資料記錄,以及判斷網站上的最近使用者活動時使用 LastActivityDate 值。

適用於