jquery+ajax+json 往数据库sqlserver里面传值 jqueryajaxjson 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://www.cnblogs.com/myaspnet/archive/2010/11/12/1876101.html using System;using System.Web;public class Handler :IHttpHandler { publicvoid ProcessRequest (HttpContext context) { charmethod = Convert.ToChar(context.Request.Params["m"]); context.Response.ContentType= "text/plain"; switch(method) { case'a': context.Response.Write("HelloWorld<br/>This is a sample"); return; case'b': context.Response.Write("HelloWorld<br/>This is b sample"); return; } context.Response.Flush(); }}$(document).ready(function(){ $("#test2").click(function(){ $.ajax({ type: "post", url: "Handler.ashx", data: {m:'a'}, success: function(result){ $("#testText").append(result+ "<br/>"); } }); }); }); $(document).ready(function(){ $("#test3").click(function(){ $.ajax({ type: "post", url: "Handler.ashx", data: {m:'b'}, success: function(result){ $("#testText").append(result+ "<br/>"); } }); }); }); url: "Handler.ashx", data: {m:'b'}, success: function(result){ $("#testText").append(result+ "<br/>"); } }); }); }); 前端将数据转成json格式,用jquery的ajax方法,post到后端。后端接受json后反序列化得到对象。 c#高手请进!帮我解决一下问题 [求]word文件修复工具 asp.net 下拉框 DropDownlist编程问题 游戏外挂程序的开发 xmlpath问题 *****为何DATALIST不能正常显示数据?**** c#数值转换问题请教 如何命令行编译C# sln工程 c# datagrid和dataset的一个问题 谁有NNuit 2.0 发我一个,立即给分! 写了一个windows服务,代码老是不执行,请各位大虾帮忙看一下 求从线程执行一个很长的Thread.Sleep()UI线程又不卡死的办法
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货