$("#Sea").click(function(){
var Search = $("#Search").val();
alert(Search);
$.ajax({
type: "get",
url: "@SiteConfig.ProductSite/ProductList.aspx",
jsonpCallback: "__ProductLists__", //回调方法
dataType: "jsonp", //跨域调用数据协议
data: { Sear: Search }, //自定义参数名,值
success: function (data) {
alert("成功");
},
error: function () {
alert("失败");
}
});
})
public ActionResult ProductList(string catagoryId, int pageNo, ProductFilterModel filterModel, string Sear)
{
catagoryId = "001.001";
pageNo = 1;
Response.Cache.SetOmitVaryStar(true);
var pager = new PagerModel(pageNo, 12);
int MemberType=2;
if (MemberInfo !=null && (MemberInfo.MemberType) != 0 )
{
MemberType = MemberInfo.MemberType;
var dt = new ProdSkuProductSystem().SelectProdSkuProductByOptionValueIds(catagoryId, filterModel.ToList(), MemberType, Sear, pager); //筛选属性查询
//public ActionResult ProductLists(string catagoryId, string Sear)
//{
// return null;
//}
前台通过Ajax传Sear参数到action中,发现传不过去,而我自己写了个测试的却能传过去,各位大神,这是什么情况啊?