日期:2014-05-17 浏览次数:20431 次
[WebMethod, ScriptMethod]
public static string LoadHtml(Student student)
{
..................
}
public Class Student
{
public string Name{get; set;}
public int Age { get; set;}
public string ClassName {get; set;}
}
var student;//问题一:这里student怎么赋值??
PageMethods.LoadHtml(student,function(html){
},function(e){
});
var currentMode={
page=1,
"mode":{
"Name":"Li LEI",
"Age":18,
"ClassName":"Class A"
},
"OrderBy":"CreateTime"
};
var searchMode=currentMode||{};
$.ajax({
url:....,
data:searchMode,
method:post,
success:function(html){
...........
},
error:function(html){
................
}
});
IhttpHandler.cs代码
void GetResponse(T value)
{
}
//问题二:这里的参数类T要怎么定义。。。。。