public IHttpHandler GetHttpHandler(RequestContext requestContext)
        {
            string id     = HttpUtility.HtmlDecode((string)requestContext.RouteData.Values["id"]);
            string action = HttpUtility.HtmlDecode((string)requestContext.RouteData.Values["action"]);

            HttpPageHelper.CurrentItem = null;
            var p = new IdeaSeedCMS.Core.Domain.DocumentLibrary();

            if (!string.IsNullOrEmpty(id))
            {
                p = new DocumentLibraryServices().GetByID(Convert.ToInt32(id));
            }

            var item = new Item();

            item.Description           = p.Name;
            item.Name                  = p.Name;
            item.SEOTitle              = p.Name;
            item.ItemReference         = p;
            HttpPageHelper.CurrentItem = item;

            var cp = new PageServices().GetByNameAccessLevel("Document Library", 60, Convert.ToInt16(ConfigurationManager.AppSettings["APPLICATIONID"]));

            //cp.PageTypeID = (int)PageType.DOCUMENT;
            HttpPageHelper.CurrentPage = cp;

            AdminBasePage page;

            page = (AdminBasePage)BuildManager.CreateInstanceFromVirtualPath("~/DocumentDetails.aspx", typeof(System.Web.UI.Page));

            HttpPageHelper.IsValidRequest = true;
            return(page);
        }
        protected void DeleteClicked(object o, EventArgs e)
        {
            var p = new DocumentLibraryServices().GetByID(Convert.ToInt16(((IdeaSeed.Web.UI.LinkButton)o).Attributes["itemID"]));

            if (p != null)
            {
                var kids = new DocumentLibraryServices().GetByParentID((int)p.ID);
                foreach (var k in kids)
                {
                    new DocumentLibraryServices().Delete(k);
                }
                new DocumentLibraryServices().Delete(p);
            }
            LoadPages(true);
        }