public ActionResult ProductAdminHome(Product product, FormCollection FC) { Session["ControllerName"] = "Product"; string subClassification = FC["SubClassification"].ToString(); string SubCategory = FC["SubCategory"].ToString(); Session["ControllerName"] = "ProductAdminHome"; // getDdlsForProduct(); if (Session["loginDetails"] != null) { ProductAdminBLL bll = new ProductAdminBLL(); LoadCategoryDDL(); getDdlsForProduct(); product.SubClassification = subClassification; product.SubCategory = SubCategory; ViewBag.DDLBrand = new SelectList(ddlbrand, "Value", "Text").ToList(); //ViewBag.SubCategory = new SelectList(ddlSubCategory, "Value", "Text").ToList(); if (ModelState.IsValid) { int res = bll.insertProduct(product); if (res > 0) { return RedirectToAction("ProductAdminHome"); } } return View(); } else { return RedirectToAction("Error"); } }