请详细查看AjaxPro.NET官方的StartKit包 { desc: "Checks if a DataSet can be passed in both directions.", showValue: false, run:function() { var ds = new Ajax.Web.DataSet(); var dt = new Ajax.Web.DataTable(); dt.addColumn("FirstName", "System.String"); dt.addColumn("Age", "System.Int32"); ds.addTable(dt);
var r = {}; r.FirstName = "Michael"; r.Age = 28; dt.addRow(r);
desc: "Checks if a DataSet can be passed in both directions.",
showValue: false,
run:function() {
var ds = new Ajax.Web.DataSet();
var dt = new Ajax.Web.DataTable();
dt.addColumn("FirstName", "System.String");
dt.addColumn("Age", "System.Int32");
ds.addTable(dt);
var r = {};
r.FirstName = "Michael";
r.Age = 28;
dt.addRow(r);
MyAjaxMethods.Test06(ds, callback, ds);
},
callback:function(res) {
return res.value.Tables[0].Rows[0].FirstName == "Michael" && res.value.Tables[0].Rows[0]["Age"] == 28 && !isNaN(res.value.Tables[0].Rows[0].Age && compareArray(res.value.Tables[0].Rows[0], res.context.Tables[0].Rows[0]));
}
},
看到过 。没用过 。