Пример #1
0
 /// <summary>
 /// Saves raw personalization data to the underlying data store.
 /// </summary>
 /// <param name="webPartManager">The WebPartManager managing the personalization data.</param>
 /// <param name="path">The path for personalization information to be used as the data store key.</param>
 /// <param name="userName">The user name for personalization information to be used as the key.</param>
 /// <param name="dataBlob">The byte array of data to be saved.</param>
 protected override void SavePersonalizationBlob(System.Web.UI.WebControls.WebParts.WebPartManager webPartManager, string path, string userName, byte[] dataBlob)
 {
     if (userName == null)
     {
         SharedPersonalization sharedPersonalization = SharedPersonalizationDataSource.LoadForPath(path, true);
         sharedPersonalization.PageSettings = dataBlob;
         sharedPersonalization.Save();
     }
     else
     {
         UserPersonalization userPersonalization = UserPersonalizationDataSource.LoadForPath(path, userName, true);
         userPersonalization.PageSettings = dataBlob;
         userPersonalization.Save();
     }
 }