点击这里给我发消息 点击这里给我发消息

MVC action返回partialView前台html 拼接

添加时间:2013-12-6
    相关阅读: VC
 

//后台

[HttpPost]

        public ActionResult GetNextLazyLoadProduct(int[] productIdList)
        {
            var products = _productService.GetProductsByIds(productIdList);
            var preparedModel = PrepareProductOverviewModels(products);
            return PartialView("_LazyLoadProducts", preparedModel);

        }

//前台

var url = "@Url.Action("GetNextLazyLoadProduct")";
                    $.ajax({
                        url: url,
                        type: "POST",
                        datatype: "json",
                        contentType: "application/json",
                        data: JSON.stringify({ productIdList: array }),
                        error: function () {
                        },
                        success: function (data) {
                            $("#lazyScrollLoading").append(data);
                            $("#lazyLoadNum").attr("value", nextLazyLoadNum);
                        }                
                    });     

 

 

咨询热线:020-85648757 85648755 85648616 0755-27912581 客服:020-85648756 0755-27912581 业务传真:020-32579052
广州市网景网络科技有限公司 Copyright◎2003-2008 Veelink.com. All Rights Reserved.
广州商务地址:广东省广州市黄埔大道中203号(海景园区)海景花园C栋501室
= 深圳商务地址:深圳市宝源路华丰宝源大厦606
研发中心:广东广州市天河软件园海景园区 粤ICP备05103322号 工商注册