- 博客(13)
- 资源 (1)
- 收藏
- 关注
原创 js跨浏览器添加移除事件
测试 测试 var eventUtil={ //添加句柄 addHandler:function (element,type,handler) { // body... if(element.addEventListener) { element.addEventListener(type,handler,false); } else if(elem
2017-11-26 09:12:29
261
原创 C# http帮助类
using System; using System.Collections.Generic; using System.Linq; using System.Web; using NotifyWebApi.Models; using System.Net; using System.IO; using System.Text; namespace NotifyWebApi
2017-11-22 18:57:46
1194
原创 c# base64帮助类
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Text; namespace NotifyWebApi.Utils { public class CBase64Util { /////
2017-11-22 18:57:20
446
原创 js ajax实现
function nt_Ajax(type,url,params,callback) { if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatecha
2017-11-21 21:10:33
359
原创 .net操作mssql
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Threading; using System.Data.Common; using System.Data; using S
2017-11-20 20:54:45
443
原创 .net 操作数据库实现
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Threading; using System.Data.Common; using IBM.Data.DB2; us
2017-11-15 19:52:26
272
转载 .net mvc4 Webapi参数绑定
默认绑定方式 WebAPI把参数分成了简单类型和复杂类型: 简单类型主要包括CLR的primitive types,(int、double、bool等),系统内置的几个strcut类型(TimeSpan、Guid等)以及string。对于简单类型的参数,默认从URI中获取。 复杂类型的数据也可以直接作为参数传入进来,系统使用media-type formatter进行解析
2017-11-08 21:08:59
481
转载 .net mvc4 Webapi Rest接口返回值
使用ASP.Net WebAPI构建REST服务返回值 Asp.Net WebAPI服务函数的返回值主要可以分为void、普通对象、HttpResponseMessag、IHttpActionResult e四种,本文这里简单的介绍一下它们的区别。 一、返回void 返回void一般常用于Put和Delete函数。 public void Delete(int id)
2017-11-08 21:06:52
745
原创 Asp.net mvc4 WebApi 中使用多个Post请求,无法识别的问题
解决方案: 方法1:修改WebApiConfig文件 //默认配置 config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}",
2017-11-07 19:21:41
2287
原创 .net json类
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Text; using System.IO; using System.Runtime.Serialization; using System.Runtime.Serializati
2017-11-06 19:29:05
278
原创 .net 日志管理
using System; using System.Collections.Generic; using System.Linq; using System.Web; using log4net; namespace WebApiDemo2.Utils { public class LogUtil { private static rea
2017-11-06 19:28:32
753
原创 .net 配置管理
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Configuration; namespace WebApiDemo2.Utils { public class ConfigUtil { //
2017-11-06 19:27:47
298
原创 .net mvc4 webapi开发备注
开发备注: html前端传送汉字参数,需要encodeURIComponent转码 Global.asax中增加以下代码,将WebApi数据以Json的形式输出 GlobalConfiguration.Configuration.Formatters.XmlFormatter.SupportedMediaTypes.Clear(); 解决.net W
2017-11-06 19:22:58
344
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅