我可以从jQuery使用Ajax控件工具包客户端吗?

我可以从jQuery使用Ajax控件工具包客户端吗?,jquery,asp.net-ajax,ajaxcontroltoolkit,Jquery,Asp.net Ajax,Ajaxcontroltoolkit,据我所知,这在Ajax库中是可能的。但这似乎已经过时了?根据我的说法,没有理由不能使用jQuery中的microsoft ajax客户端javascript库 我想你可以正常访问它。试试这个,看看是否有效。您可以参考上面提到的MicrosoftAjax库和jQuery库 $(document).ready(function () { Type.registerNamespace("Demo"); Demo.Person = function(firstName, lastName, em

据我所知,这在Ajax库中是可能的。但这似乎已经过时了?

根据我的说法,没有理由不能使用jQuery中的microsoft ajax客户端javascript库

我想你可以正常访问它。试试这个,看看是否有效。您可以参考上面提到的MicrosoftAjax库和jQuery库

$(document).ready(function () {
   Type.registerNamespace("Demo");

Demo.Person = function(firstName, lastName, emailAddress) {
    this._firstName = firstName;
    this._lastName = lastName;
    this._emailAddress = emailAddress;
}

Demo.Person.prototype = {
    getFirstName: function() {
        return this._firstName;
    },

    getLastName: function() {
        return this._lastName;
    },

    getEmailAddress: function() {
        return this._emailAddress;
    },
    setEmailAddress: function(emailAddress) {
        this._emailAddress = emailAddress;
    },

    getName: function() {
        return this._firstName + ' ' + this._lastName;
    },

    dispose: function() {
        alert('bye ' + this.getName());
    },

    sendMail: function() {
        var emailAddress = this.getEmailAddress();

        if (emailAddress.indexOf('@') < 0) {
            emailAddress = emailAddress + '@example.com';
        }
        alert('Sending mail to ' + emailAddress + ' ...');
    },

    toString: function() {
        return this.getName() + ' (' + this.getEmailAddress() + ')';
    }
}

Demo.Person.registerClass('Demo.Person', null, Sys.IDisposable);
Demo.Employee = function(firstName, lastName, emailAddress, team, title) {
    Demo.Employee.initializeBase(this, [firstName, lastName, emailAddress]);

    this._team = team;
    this._title = title;
}

Demo.Employee.prototype = {

    getTeam: function() {
        return this._team;
    },
    setTeam: function(team) {
        this._team = team;
    },

    getTitle: function() {
        return this._title;
    },
    setTitle: function(title) {
        this._title = title;
    },
    toString: function() {
        return Demo.Employee.callBaseMethod(this, 'toString') + '\r\n' + this.getTitle() + '\r\n' + this.getTeam();
    }
}
Demo.Employee.registerClass('Demo.Employee', Demo.Person);
});
$(文档).ready(函数(){
类型。registerNamespace(“演示”);
Demo.Person=函数(名字、姓氏、电子邮件地址){
这个。_firstName=firstName;
这是。_lastName=lastName;
此地址。_emailAddress=emailAddress;
}
Demo.Person.prototype={
getFirstName:函数(){
返回此。\u firstName;
},
getLastName:函数(){
返回此。\u lastName;
},
getEmailAddress:函数(){
返回此地址。\u电子邮件地址;
},
setEmailAddress:函数(emailAddress){
此地址。_emailAddress=emailAddress;
},
getName:function(){
返回此项。_firstName+“”+此。_lastName;
},
dispose:function(){
警报('bye'+this.getName());
},
sendMail:function(){
var emailAddress=this.getEmailAddress();
if(emailAddress.indexOf('@')<0){
emailAddress=emailAddress+“@example.com”;
}
警报('将邮件发送到'+emailAddress+'…');
},
toString:function(){
返回此.getName()+'('+此.getEmailAddress()+');
}
}
Demo.Person.registerClass('Demo.Person',null,Sys.IDisposable);
Demo.Employee=函数(名字、姓氏、电子邮件地址、团队、职务){
Demo.Employee.initializeBase(这个[firstName,lastName,emailAddress]);
这个队;
这个._title=标题;
}
Demo.Employee.prototype={
getTeam:function(){
把这个还给你的团队;
},
SETTAM:职能(团队){
这个队;
},
getTitle:function(){
返回此标题;
},
setTitle:函数(标题){
这个._title=标题;
},
toString:function(){
返回Demo.Employee.callBaseMethod(this'toString')+'\r\n'+this.getTitle()+'\r\n'+this.getTeam();
}
}
Demo.Employee.registerClass('Demo.Employee',Demo.Person);
});