当前位置:编程学习 > C#/ASP.NET >>

使用ajax.net里的PageMethods,回调的结果是页面的html,为什么?

如题 --------------------编程问答-------------------- 你客户端代码调用的是什么函数?
那个函数返回什么?
具体代码? --------------------编程问答--------------------           function validateEmail()
                                        {                                             
                              
                                           
                                            PageMethods.GetServerIsUseEmail(isUseEmail);
                                        }
                                        
function isUseEmail(result) {                                           
                             
                                            alert(result);                                 
                                        } --------------------编程问答--------------------     [System.Web.Services.WebMethod]
    public static string GetServerIsUseEmail()
    {
        return "3213123213";
    } --------------------编程问答-------------------- 我发现我的PageMethods.GetServerIsUseEmail方法执行服务器从页面Page_Load方法开始执行,但没有执行我的GetServerIsUseEmail方法 --------------------编程问答-------------------- 添加scriptmanager 了吗?若添加 EnablePageMethod属性 一定要设置为true 默认是false
补充:.NET技术 ,  ASP.NET
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,