public ActionResult Elemento(int?id = null)
        {
            if (!this.currentUser())
            {
                return(RedirectToAction("Ingresar"));
            }
            DynContentBL contextBL = new DynContentBL();
            IList <TipoDynamicContent> categorias = contextBL.getCategorias();

            categorias.Insert(0, new TipoDynamicContent()
            {
                IdTipoDynamicContent = 0, Nombre = "Seleccione el tipo de contenido"
            });
            ViewBag.Categorias = categorias.AsEnumerable();
            var objSent = TempData["objSent"];

            if (objSent != null)
            {
                TempData["objSent"] = null; return(View(objSent));
            }
            if (id != null)
            {
                return(View(contextBL.getElementById((int)id)));
            }
            return(View());
        }
        public ActionResult Home(int?id = null)
        {
            if (!this.currentUser())
            {
                return(RedirectToAction("Ingresar"));
            }
            DynContentBL contextBL = new DynContentBL();

            ViewBag.Categorias       = contextBL.getCategorias();
            ViewBag.SelectedCategory = id != null ? (int)id : 1;
            return(View(contextBL.getElementsByCategoria(id != null ? (int)id : 1)));
        }