示例#1
0
        private void getAllCategories()
        {
            ECommerceBusiness ecb = new ECommerceBusiness();
            DataTable         dt  = ecb.GetAllCategories();

            if (dt.Rows.Count > 0)
            {
                ListItem item = new ListItem("Select Category", "-1");
                ddlProductCategory.DataSource = dt;
                ddlProductCategory.DataBind();
                ddlProductCategory.Items.Insert(0, item);
            }
        }