//后台
int StockCount = ProductInStockList.Count; ViewData["StockCount"] = ProductInStockList.Count; //异步请求 if (Request.IsAjaxRequest()) { return PartialView("ProductInStockList", ProductInStockList); }