//提交表单数据
var form = new mini.Form("#form1");
var data = form.getData(); //获取表单多个控件的数据
var json = mini.encode(data); //序列化成JSON
$.ajax({
url: "../data/FormService.aspx?method=SaveData",
type: "post",
data: { submitData: json },
success: function (text) {
alert("提交成功,返回结果:" + text);
}
});
}
后台 public void SaveData()
{
//获取提交的数据
String submitJSON = Request["submitData"];
Hashtable data = (Hashtable)Test.JSON.Decode(submitJSON);