Ejemplo n.º 1
0
        private void BindSizeOrModel()
        {
            int id = 0;

            Int32.TryParse(ddlMainCategory.SelectedValue, out id);
            UnitTypeDAL          dal = new UnitTypeDAL();
            List <UnitTypeModel> lst = dal.BindDataByMainCat(id);

            ddlSizeOrModel.DataSource     = lst;
            ddlSizeOrModel.DataTextField  = "Name";
            ddlSizeOrModel.DataValueField = "ID";
            ddlSizeOrModel.DataBind();
            ddlSizeOrModel.Items.Insert(0, new ListItem("Select One", ""));
        }