Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     PageManager manager = new PageManager();
     _Masters.Master master = this.Master as _Masters.Master;
     if (master != null)
     {
         manager.Holders = master.ContentPlaceHolderMain;
         int SectionID = 0;
         Int32.TryParse(Request["Section"], out SectionID);
         manager.LoadControls(this, SectionID, 8);
     }
 }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //LayoutManager manager = new LayoutManager();
            //_Masters.Master master = this.Master as _Masters.Master;
            //if (master != null)
            //{
            //    manager.Holders = master.ContentPlaceHolderMain;
            //    manager.LoadControls(this, 71);
            //}
            //if (!IsPostBack)
            {
                PageManager manager = new PageManager();
                _Masters.Master master = this.Master as _Masters.Master;
                if (master != null)
                {
                    manager.Holders = master.ContentPlaceHolderMain;
                    int SectionID = 0;

                    string code = Request["Section"];
                    if (string.IsNullOrEmpty(code))
                    {
                        if (Page.RouteData.Values["sectionName"] != null)
                        {
                            code = Page.RouteData.Values["sectionName"].ToString();
                            if (!string.IsNullOrEmpty(code))
                            {
                                code.Replace("-", " ");
                                BusinessLogicLayer.Entities.ContentManagement.SiteSection section = BusinessLogicLayer.Common.SiteSectionLogic.GetByAlias(code);
                                if(section != null)
                                    SectionID = section.SiteSectionId;
                            }
                        }
                    }
                    else
                    {
                        Int32.TryParse(code, out SectionID);
                    }
                    manager.LoadControls(this, SectionID, 1);
                }

                //string str = BusinessLogicLayer.Common.ContentDomain;
            }
        }