private void SavePageState(PlayListPageState pagestate)
 {
     Session["PlayListPageState"] = pagestate;
 }
        private PlayListPageState GetPageState()
        {
            try
            {
                PlayListPageState pagestate = new PlayListPageState();

                // Initialize the session values if they don't exist - need to do this the first time controller is hit
                if (Session["PlayListPageState"] == null)
                {
                    int accountid = 0;
                    if (Session["UserAccountID"] != null)
                        accountid = Convert.ToInt32(Session["UserAccountID"]);

                    pagestate.AccountID = accountid;
                    pagestate.PlayListName = String.Empty;
                    pagestate.Tag = String.Empty;
                    pagestate.IncludeInactive = false;
                    pagestate.SortBy = "PlayListName";
                    pagestate.AscDesc = "Ascending";
                    pagestate.PageNumber = 1;
                    Session["PlayListPageState"] = pagestate;
                }
                else
                {
                    pagestate = (PlayListPageState)Session["PlayListPageState"];
                }
                return pagestate;
            }
            catch { return new PlayListPageState(); }
        }