- 博客(19)
- 收藏
- 关注
原创 .NET CORE上传文件(AJAX形式)
后台Action: [HttpPost] public string UploadFile() { if (Request.Form.Files.Count == 0) return GetFalseResult("未检测到文件"); string path
2017-04-01 11:44:55
3946
原创 js 按指定大小等比缩放预览图片
$scope.init = function () { if (!FileReader) { utils.showError("您的浏览器不支持HTML5,请使用现代浏览器"); return; } ///获取
2017-04-01 11:40:54
1581
原创 C# 队列池
public class QueueServicePool { private static QueueServicePool _instance = new QueueServicePool(); public static QueueServicePool Instacne { get
2017-03-31 16:50:26
874
原创 ASP.NET CORE CACHE的使用(含MemoryCache,Redis)
定义通用工具类 :CacheUntity public class CacheUntity { private static ICacheHelper _cache = new RedisCacheHelper();//默认使用Redis private static bool isInited = false; p
2017-03-17 11:55:47
4984
原创 .NET WebApi上传文件接口(带其他参数)
using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; using Newtonsoft.Json; using System.Thread
2017-02-28 14:51:47
8508
2
原创 C# 发起普通http请求
public class NetHelper { private static NetHelper _instance = new NetHelper(); public static NetHelper Instance { get { r
2017-02-27 16:13:52
424
原创 C# CulPost,用于微信上传多媒体文件中的图片
/// /// 向指定的URL地址发起一个POST请求,同时可以上传一些数据项以及上传文件。 /// /// 要请求的URL地址 /// 要上传的文件路径 /// 服务器的返回结果 public string CulPost(string url, string filepath)
2017-02-27 16:07:23
742
原创 C#发起带证书的http请求(通常用于微信发红包)
/// /// 带证书请求 /// /// 请求的地址 /// 超时时间 /// 请求的字符串 /// 是否是POST /// 字符集编码 /// 证书路径 /// 证书密码 /// 消息 ///
2017-02-27 15:55:11
3480
原创 封装图片上传插件(用到html5技术)
//js: function ie6scroll(box, h, wbox_h) { var box = box;//弹窗的div,例如.class/#id window.onscroll = function () { scrollT = $(document).scrollTop();//获取滚动条高度 var top = (h - wbox_
2017-02-20 20:37:58
1011
转载 C# ASP.NET GridView导出EXCEL。
using System.IO; using System.Web.UI; public void GridViewToExcel(Control ctrl) { try { HttpContext.Current.Response.Charset = "GB2312";
2014-09-10 16:15:25
735
原创 ASP.NET 截取本服务器访问地址。
public void Tourl(string urlstr) { string[] searchurl = HttpContext.Current.Request.Url.AbsoluteUri.Split('/'); string url = "http:/"; for (int i = 1; i
2014-09-10 15:45:06
413
转载 C# 操作INI文件的函数 INIClass
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace InfoBank { public class INIClass { // 声明INI文件的写操作函数 WritePrivateProfileS
2014-09-10 10:04:42
1541
原创 ASP.NET程序写错误log的函数。
C# CODE: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.IO; namespace InfoBank { public class Exlog { public void Write
2014-09-10 10:01:18
433
转载 C# 客户端向服务器 POST/GET函数
using System; using System.Collections.Generic; using System.IO; using System.Net; using System.Text; namespace InfoBank { public class NetHelper { Exlog log = new Exlog()
2014-09-08 22:10:32
542
原创 C# DataTable转json,DataSet转json
#region dataTable转换成Json格式 /// /// dataTable转换成Json格式 /// /// /// public string DataTable2Json(DataTable dt) {
2014-09-04 16:02:04
1148
原创 C#将DataTable拼成html Table标签。
const string TBstart = ""; const string TBend = ""; const string TRsrart = ""; const string TRend = ""; const string TDstart = ""; cons
2014-09-04 13:18:23
1559
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅