我用的是ajaxpro.2.dll
引用了
在web.config里面添加了
<httpHandlers>
   <add verb="POST,GET" path="ajaxpro/*.ashx" type="AjaxPro.AjaxHandlerFactory, AjaxPro.2"/>
</httpHandlers>
实现如下效果
<td width="351" id="loginFlag"><a href="#">登陆</a> <a href="#">注册</a> <a href="#">取回密码</a></td>
如果用户在线 则显示 欢迎+………………代码如下
public partial class Ascx_Top : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //AjaxPro.Utility.RegisterTypeForAjax(typeof(Ascx_Top));
    }
    [AjaxPro.AjaxMethod]
    public string User_Bar()
    {
        string UserBar = "";
        if (Request.IsAuthenticated == true)
        {
            UserBar = "欢迎  " + Context.User.Identity.Name;
            UserBar += "|" + "<a href='sign_out.aspx'>注销</a>";        }
        return UserBar;
    }
}
js如下:
function IsLogin_CallBack()
    {
        var status = Ascx_Top.User_Bar().value;
        if( status == null && typeof(status) != 'object')
        {
            return;
        }
        var Ustatus = GetElement("loginFlag");
        if(bytes(status) = 0)
        {
            Ustatus.innerHTML = status;
        }
    }
报错,提示Ascx_Top is not defined
为什呢么?