代码改变世界

随笔档案-2017年07月

分页控件Webdiyer.MvcPager

2017-07-28 16:58 by huoit, 776 阅读, 收藏, 编辑
摘要: MVC 1、安装控件 2、Cotroller using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using Huo.CMS.Web.Mo 阅读全文

.NET拾忆:FormData文件上传

2017-07-20 10:08 by huoit, 449 阅读, 收藏, 编辑
摘要: 方法1、FormData简单实现 后端: using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tas 阅读全文

正则表达式:各类数值

2017-07-19 16:26 by huoit, 456 阅读, 收藏, 编辑
摘要: 只允许两位小数点 其他 1、只允许输入数字 2、只允许输入大于0的正整数 3、数字小数点 资料: http://www.jb51.net/article/51102.htm 阅读全文

JS日期格式化扩展

2017-07-19 14:05 by huoit, 230 阅读, 收藏, 编辑
摘要: 1、扩展 2、使用 阅读全文

.Net拾忆:HttpWebRequest/WebClient两种方式模拟Post

2017-07-17 22:19 by huoit, 914 阅读, 收藏, 编辑
摘要: 一、代码 1、HttpWebRequest 2、WebClient 二、测试工具: Postman : chrome插件 地址: Postman的使用介绍 1、form-data: 就是http请求中的multipart/form-data,它会将表单的数据处理为一条消息,以标签为单元,用分隔符分开 阅读全文

UEditor

2017-07-15 17:26 by huoit, 198 阅读, 收藏, 编辑
摘要: 官网: http://fex.baidu.com/ueditor/ 1、使用 初始化: <script src="~/ueditor/ueditor.config.js"></script> <script src="~/ueditor/ueditor.all.min.js"></script> < 阅读全文

WebAPI安全

2017-07-14 14:15 by huoit, 169 阅读, 收藏, 编辑
摘要: 1、Oauth Oauth2.0各语言版本公认框架https://oauth.net/code/ 阅读全文

WebAPI的跨域访问CORS三种方法

2017-07-10 09:21 by huoit, 836 阅读, 收藏, 编辑
摘要: 跨域访问: JSONP的原理利用<script>没有跨域访问的限制,利用<script>的src跨域访问api,api会根据数据把json包装在一个js里面,这样跨域的客户端拿到json的包装(json padding)就会调用本地的函数解析数据。总结来说就是利用两点1、浏览器的跨域限制其实是接收了 阅读全文

.Net拾忆:从List去除重复-拾忆集合

2017-07-03 17:37 by huoit, 1287 阅读, 收藏, 编辑
摘要: 方法1: 原理:HashSet每次存入会计算哈希值,哈希值相同则比较对方是否相同,不同则直接存入 方法2: 原理:Enumerable中Distinct官方实现 拾忆 1.HashSet 只去重复, 没有顺序 HashSet的add方法会调用hashCode和equals, 所以存储在HashSet 阅读全文
点击右上角即可分享
微信分享提示