日期:2014-05-16  浏览次数:20451 次

ASP.NET JQUERY调用服务器端方法
有一cs后台方法 我想在前台调用 代码如下
但是不执行后台
        [System.Web.Services.WebMethod()] 
        public void GetValues(string str)
        {
              Response.Write(str);
        }
JQUERY前台
var data = 0;
if (data == 0) {
                       
                        var params = "10000";
                        $.ajax({
                            type: "POST",
                            contentType: "application/json",
                            url: "Page.aspx/GetValues",
                            data: params,
                            dataType: 'json',
                            success: function () {
                            }
                        });
                    }
------解决方案--------------------
http://www.cnblogs.com/acles/articles/2385648.html