public ActionResult GetSubCategory(int productCategoryId) { List <SubCategory> categoryCollection = SubCategoryDbModel.GetAllSubCategoryFromDBForSpecificCategoryId(productCategoryId); return(Json(new { html = ViewRenderer.RenderPartialToString(this.ControllerContext, "SubCategories", new ViewDataDictionary(categoryCollection), new TempDataDictionary()) }, JsonRequestBehavior.AllowGet)); //return View("SubCategories",categoryCollection); }