protected void Page_Load(object sender, EventArgs e) { _zonecurrent = ZoneUtility.GetZoneCurrent(); var zoneLayout = ZoneDB.GetZoneLayout(_zonecurrent); if (zoneLayout.Length > 0) { switch (zoneLayout) { case "Layout_Zone_ClassRegister": break; case "Layout_Zone_Khoahoc": case "Layout_Zone_Mamnon": TuyenSinh_Home1.Visible = true; Search_Khoahoc1.Visible = true; Subcategory_2level1.Visible = true; News_Sub1.Visible = true; break; case "Layout_Zone_Contact": TuyenSinh_Home1.Visible = true; CamNhan_Sub1.Visible = true; break; default: TuyenSinh_Home1.Visible = true; CamNhan_Sub1.Visible = true; Music_Home1.Visible = true; Video_RightSub1.Visible = true; break; } } }
protected void Page_Load(object sender, EventArgs e) { _zonecurrent = ZoneUtility.GetZoneCurrent(); var zoneLayout = ZoneDB.GetZoneLayout(_zonecurrent); if (zoneLayout.Length > 0) { PlaceHolder1.Controls.Add(Page.LoadControl("Layout/" + zoneLayout + ".ascx")); } else { Response.Redirect("/"); } }
protected void Page_Load(object sender, EventArgs e) { _itemid = ConvertUtility.ToInt32(Request.QueryString["itemid"]); var disInfo = DistributionDB.GetInfo(_itemid); if (disInfo != null) { if (disInfo.Distribution_Layout == "zone") { PlaceHolder1.Controls.Add(Page.LoadControl("Layout/" + ZoneDB.GetZoneLayout(disInfo.Distribution_ZoneID) + "_Item.ascx")); } else { PlaceHolder1.Controls.Add(Page.LoadControl("Layout/" + disInfo.Distribution_Layout + "_Item.ascx")); } } else { Response.Redirect("/"); } }