摘要: 先加一个扩展函数: Array.prototype.contains = function (obj) { var index = this.length; while (index--) { if (this[index] obj) { return true; } } return false; 阅读全文
posted @ 2019-03-28 17:45 何以平天下 阅读(18279) 评论(2) 推荐(1)
摘要: 在websrvice发布文件的webconfig中加入 <httpRuntime maxRequestLength="102400" /> <webServices> <protocols> <add name="HttpPost" /> <add name="HttpGet" /> </proto 阅读全文
posted @ 2019-03-12 17:47 何以平天下 阅读(628) 评论(0) 推荐(0)
摘要: WebService中发布之后出现这个错误, 解决方法: web.config文件中的 <system.web> 节点下加入:<webServices> <protocols> <add name= "HttpPost"/> <add name= "HttpGet"/> </protocols></ 阅读全文
posted @ 2019-03-07 16:54 何以平天下 阅读(841) 评论(0) 推荐(0)
摘要: 在system.webServer节点下加上(.Net接口) <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Methods" value="OPTIONS,POST,GET" /> <add name="Access-C 阅读全文
posted @ 2019-01-18 17:26 何以平天下 阅读(160) 评论(0) 推荐(0)
摘要: 先添加QRCoder NuGet程序包(生成二维码要用到) // 生成二维码的内容 string strCode = “123456”; QRCodeGenerator qrGenerator = new QRCoder.QRCodeGenerator(); QRCodeData qrCodeDat 阅读全文
posted @ 2019-01-09 16:51 何以平天下 阅读(178) 评论(0) 推荐(0)
摘要: MemoryStream ms = new MemoryStream(); //要先把二进制流进行编码,再传输,解决乱码问题 Convert.ToBase64String(ms.ToArray()); context.Response.Write(Convert.ToBase64String(ms. 阅读全文
posted @ 2019-01-09 16:45 何以平天下 阅读(487) 评论(0) 推荐(0)
摘要: //阻止冒泡上层clickevent.stopPropagation(); 阅读全文
posted @ 2019-01-09 15:42 何以平天下 阅读(855) 评论(0) 推荐(0)
摘要: create table #t(keyId int identity,actionDate datetime)insert into #t(actionDate) select distinct CreateDate from CRM_ScoreTransaction WHERE MemberID= 阅读全文
posted @ 2019-01-04 11:41 何以平天下 阅读(1471) 评论(0) 推荐(0)
摘要: 同样返回 int i = 1; string strJson = "{\"result\":" + i + "}"; context.Response.Write(strJson); 时, $.ajax接收的没有外面的引号 $.post接收的有外面的引号 阅读全文
posted @ 2019-01-02 16:36 何以平天下 阅读(402) 评论(0) 推荐(0)
摘要: html+ashx发布之后访问不了ashx文件。(开发时一直是对的) .NETFramework开发时是4.5,服务器上的网站是2.0的。 开始意识到这个问题,发布时选择4.5的Framework。之后就一直是ashx 404 (Not Found)。找不到ashx文件。 改文件夹的访问权限,修改调 阅读全文
posted @ 2019-01-02 16:29 何以平天下 阅读(734) 评论(0) 推荐(0)