public static List <AdminMediaControl> GetUserMediaAsAdminMediaControls(int userId, int loggedInUserId)
        {
            var  mediaControls = new List <AdminMediaControl>();
            Page httpHandler   = (Page)HttpContext.Current.Handler;

            foreach (ParsnipData.Media.Media temp in ParsnipData.Media.Media.SelectByUserId(userId, loggedInUserId))
            {
                AdminMediaControl myAdminMediaControl = (AdminMediaControl)httpHandler.LoadControl("~/Custom_Controls/Admin/AdminMediaControl.ascx");
                myAdminMediaControl.MyMedia = temp;
                mediaControls.Add(myAdminMediaControl);
            }

            return(mediaControls);
        }
        public static List <AdminMediaControl> GetAlbumAsAdminMediaControls(MediaTag mediaTag)
        {
            var  mediaControls  = new List <AdminMediaControl>();
            Page httpHandler    = (Page)HttpContext.Current.Handler;
            int  loggedInUserId = ParsnipData.Accounts.User.LogIn().Id;

            foreach (ParsnipData.Media.Media temp in mediaTag.GetAllMedia(loggedInUserId))
            {
                AdminMediaControl myAdminMediaControl = (AdminMediaControl)httpHandler.LoadControl("~/Custom_Controls/Admin/AdminMediaControl.ascx");
                myAdminMediaControl.MyMediaTag = mediaTag;
                myAdminMediaControl.MyMedia    = temp;
                mediaControls.Add(myAdminMediaControl);
            }

            return(mediaControls.OrderByDescending(mediaControl => mediaControl.MyMedia.DateTimeCaptured).ToList());
        }