AjaxControlToolkit.TabContainer.LoadClientState C# (CSharp) Method

LoadClientState() protected method

protected LoadClientState ( string clientState ) : void
clientState string
return void
        protected override void LoadClientState(string clientState)
        {
            var state = (Dictionary<string, object>)new JavaScriptSerializer().DeserializeObject(clientState);
            if(state != null) {
                ActiveTabIndex = (int)state["ActiveTabIndex"];
                ActiveTabIndex = GetServerActiveTabIndex(ActiveTabIndex);

                object[] tabEnabledState = (object[])state["TabEnabledState"];
                object[] tabWasLoadedOnceState = (object[])state["TabWasLoadedOnceState"];
                for(int i = 0; i < tabEnabledState.Length; i++) {
                    int j = GetServerActiveTabIndex(i);
                    if(j < Tabs.Count) {
                        Tabs[j].Enabled = (bool)tabEnabledState[i];
                        Tabs[j].WasLoadedOnce = (bool)tabWasLoadedOnceState[i];
                    }
                }
            }
        }