求助:关于Ajax请求,GET/POST请求有问题吗?

我的控制器方法:

public ActionResult Products(int shopId)
    {
        var products = db.Products.Where(x => x.ShopId == shopId).ToList();             
        return Json(products, JsonRequestBehavior.AllowGet);
    }

ajax:

 $.ajax({
             type: 'GET', 
             url: 'Home/Products', 
             data: 'shopId=' + shopId, 
             success: function(data){              
                 $('.results').html(data);
                 productList = data;
             }

 });

数据转到控制器的话,按理来说我可以得到新的视图。但这代码并不管用,难道是我的GET/POST请求有问题吗?

public ActionResult Products(int shopId)
    {
        var products = db.Products.Where(x => x.ShopId == shopId).ToList();             
        return View(products);
    }

谢谢!

You don't need to use ajax in this case. You can redirect to the view like following.

window.location='Home/Products?shopId=' + shopId;