我是 Ajax 新手。我在 ASPX 页面中使用了 AjaxPro 来执行方法。我在 .NET 2.0 中使用了以下代码
在 ASPX 中:
$(function() {
$( "#sortable" ).sortable({
placeholder: "ui-state-highlight",
update: function(event, ui) {
var order = $('#sortable').sortable('serialize');
var retStr = SortTest.Save(order);
}
});
$( "#sortable" ).disableSelection();
});
</script>
在 CS 文件中:
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections;
using System.Web;
using Ajaxpro;
public partial class SortTest : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
AjaxPro.Utility.RegisterTypeForAjax(typeof(SortTest));
}
[AjaxPro.AjaxMethod]
public string Save(string corder)
{
return "Test";
}
}
它工作正常,但是当我在 .NET 1.1 (AjaxPro.JSON.dll) 中使用时,它无法正常工作,即使我不知道如何注册。请帮我 ajaxpro for .NET1.1 。