一丶WebService
1.新建项目
2.选择Web窗体
3.添加新建项
二丶一般处理程序
前台访问:
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
1 $.ajax({ 2 type: "post", 3 url: "Handler1.ashx", 4 data: {}, 5 dataType: "json", 6 contentType: "application/json", 7 success: function (data) { 8 alert(data);//返回的数据用data.d获取内容 9 }, 10 error: function (err) { 11 alert(err); 12 } 13 });