//前台AJAX
function GetAccPage() {
$.ajax({
url: "",
data: {
type: UserType
},
success: function (data) {
var dt = JSON.parse(data).Result;
}
});
}
//后台
public void ProcessRequest(HttpContext context)
{
string str = "";
string guid = context.Request["type"];
DataTable dt = cusb.GetAccesspage(guid);
if (dt.Rows.Count > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
str += "";
}
}
context.Response.Write("{\"Result\":\"" + str.ToString() + "\"}");
context.Response.End();
}
原文:http://www.cnblogs.com/illegal/p/6374295.html