예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            PetStore.DB.Data oDB = new PetStore.DB.Data();
            mainCategory = "";
            categoryName = "";
            mainCategory = Request.QueryString["MainCat"];
            categoryName = Request.QueryString["Cat"];
            if (mainCategory == null)
            {
                mainCategory = "DOG";
            }
            if (categoryName == null)
            {
                categoryName = oDB.GetFirstCategoryForMainCategory(mainCategory);
            }

            DataTable dtCategories = new DataTable();

            dtCategories = oDB.GetCategories(mainCategory); //, categoryName);

            rptLeftNav.DataSource = dtCategories;
            rptLeftNav.DataBind();



            //string url = HttpContext.Current.Request.Url.AbsoluteUri;  // http://localhost:1302/TESTERS/Default6.aspx
            ////home product calendar checjlist vet login, faq
            //if (url.Contains("dog")) { LeftStyleType = "DOG";  }
            //else if (url.Contains("cat")) { LeftStyleType = "CAT"; }
            //else if (url.Contains("fish")) { LeftStyleType = "FISH";  }
            //else if (url.Contains("bird")) { LeftStyleType = "BIRD";   }
        }