<%
@?WebHandler?Language
=
"
C#
"
?Class
=
"
Handler
"
?
%>
using
?System;
using
?System.Web;
using
?System.Data;
using
?System.Text;
public
?
class
?Handler?:?IHttpHandler?{
????
????
public
?
void
?ProcessRequest?(HttpContext?context)?{
????????
/*
context.Response.ContentType?=?"text/plain";
????????string?data?=?"[{name:\"fan\",age:26},{name:\"wang\",age:25}]";//构建的json数据
????????context.Response.Write(data);
*/
????????DataSet?ds?
=
?
new
?DataSet();
????????DataTable?dt?
=
?
new
?DataTable();
????????dt.Columns.Add(
"
name
"
,?
typeof
(
string
));
????????dt.Columns.Add(
"
year
"
,?
typeof
(
string
));
????????dt.Columns.Add(
"
avg
"
,?
typeof
(
string
));
????????DataRow?tr?
=
?dt.NewRow();
????????tr[
"
name
"
]?
=
?
"
张三<