Rock.Web.UI.Controls.PersonProfileBadgeList.LoadViewState C# (CSharp) Method

LoadViewState() protected method

Restores view-state information from a previous request that was saved with the M:System.Web.UI.WebControls.WebControl.SaveViewState method.
protected LoadViewState ( object savedState ) : void
savedState object An object that represents the control state to restore.
return void
        protected override void LoadViewState( object savedState )
        {
            base.LoadViewState( savedState );

            var json = ViewState["PersonBadges"] as string;
            if ( !string.IsNullOrWhiteSpace( json ) )
            {
                PersonBadges = JsonConvert.DeserializeObject( json, typeof( List<PersonBadgeCache> ) ) as List<PersonBadgeCache>;
            }
        }