日期:2014-05-17 浏览次数:20453 次
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WebApplication1
{
/// <summary>
/// Handler1 的摘要说明
/// </summary>
public class Handler1 : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
//string JsonData = context.Request.QueryString["Json"];
string JsonData = context.Request["Json"];
context.Response.ContentType = "text/plain";
context.Response.ContentEncoding = System.Text.Encoding.UTF8;
//context.Response.Write("Hello World");
context.Response.Write(string.Format("你刚刚提交上来的数据:\n{0}", JsonData));
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
System.Collections.Specialized.NameValueCollection Data = new System.Collections.Specialized.NameValueCollection();
Data.Add("Json", "{\"Name\":