Exemplo n.º 1
0
        public JsonResult GetSubCategory(string id)
        {
            List<SelectListItem> subCategory = new List<SelectListItem>();
            ProductAdminBLL bll = new ProductAdminBLL();

            Dictionary<string, string> list = bll.GetSUBCategoryBasedOnID(id);

            foreach (var item in list)
            {
                subCategory.Add(new SelectListItem { Text = item.Value, Value = item.Key });
            }

            return Json(new SelectList(subCategory, "Value", "Text"));
        }