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

AjaxPro.Method调用为什么总是返回null

我刚学asp.net,看个程序用到了AjaxPro,可是我一调试,所有AjaxPro.Method的调用全都返回null,也不报错...我都晕了,请各位帮帮我啊.

web里我也设置里:
<httpHandlers>
<add verb="*" path="*.ashx" type="AjaxPro.AjaxHandlerFactory,AjaxPro.2"/>
</httpHandlers>


Default.aspx.cs里我也设置了
AjaxPro.AjaxNamespace("xkziBook")]
public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        AjaxPro.Utility.RegisterTypeForAjax(typeof(_Default));
       
    }
[AjaxPro.AjaxMethod]
    public bool userLogin(string pass)
    {
        return false;
    }
..........



Default.aspx的js里我为了查看值如下写的:
alert(xkziBook.userLogin().value);
可是怎么搞它都返回null ,为什么啊? --------------------编程问答-------------------- AjaxPro.AjaxMethod] 
    public  static bool userLogin(string pass) 
    { 
        return false; 
    } 
--------------------编程问答-------------------- [AjaxPro.AjaxMethod]  
    public  static bool userLogin(string pass)  
    {  
        return false;  
    }  
--------------------编程问答--------------------

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page 
{
    [AjaxPro.AjaxNamespace("xkziBook")]
    protected void Page_Load(object sender, EventArgs e)
    {
        AjaxPro.Utility.RegisterTypeForAjax(typeof(_Default));
    }
  
    [AjaxPro.AjaxMethod()]
    public string test(string clid)
    {
        return clid;
    }
}







<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <script type="text/javascript">
    function Button1_onclick() 
    {
       alert(_Default.test("123").value);
    }

    </script>

    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <input id="Button1" type="button" value="button" language="javascript" onclick="return Button1_onclick()" /></div>
    </form>
</body>
</html>

--------------------编程问答-------------------- 什么解决啊?
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,