Fork me on GitHub
.net求学者

随笔分类 -  ASP.NET

ASP.NET
摘要:首先要保证接口能够正常访问,OPTION请求很容易被限制,包括IIS 或防火墙等; 服务端(WCF)IIS配置: <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="*" /> <add name 阅读全文
posted @ 2020-06-03 22:15 hy31337 阅读(748) 评论(0) 推荐(0)
摘要:大批量数据Excel 比如数据量一大(比如上万条以上的记录),用传统的方式和插件等导出excel速度都很慢,甚至最终导致内存益出;往文本文件直接插入记录的方式(速度快,占内存也少),然后用\t割开代表一列,产生的文件,直接用excel打开就可以,单只支持单个sheet页,office2003(xls 阅读全文
posted @ 2020-03-19 11:41 hy31337 阅读(3714) 评论(0) 推荐(0)
摘要:Cells cells = sheet.Cells; Style style = workbook.Styles[workbook.Styles.Add()]; style.Font.IsBold = true; style.Font.Name = "宋体"; style.Font.Size = 1 阅读全文
posted @ 2020-02-12 18:01 hy31337 阅读(3592) 评论(0) 推荐(0)
摘要:.NET VS工具添加程序包源 在NuGet包管理中选择程序包源为上面添加的私有仓库。 搜索Data.Pipelines并安装。 在app.congif或者web.config中添加Kafka配置 <appSettings> <add key="kafka.ip" value="172.20.105 阅读全文
posted @ 2020-02-07 22:05 hy31337 阅读(1052) 评论(0) 推荐(0)
摘要:C# SQL Server: ROUND函数为四舍五入 阅读全文
posted @ 2019-05-08 08:46 hy31337 阅读(1959) 评论(0) 推荐(0)
摘要:公共类 页面--引用JQuery、EasyUI VideoHK8700.js /****视频回看****/ 页面--后台代码与前面查看实时视频一致 阅读全文
posted @ 2019-01-04 15:20 hy31337 阅读(3162) 评论(0) 推荐(0)
摘要:海康9800视频 --%> /vms/baseui/themes/default/css/all.css" rel="stylesheet" /> /vms/web/assets/default/css/monitor.css" type="text/c... 阅读全文
posted @ 2018-07-27 16:32 hy31337 阅读(1647) 评论(0) 推荐(1)
摘要:针对单个页面-Web页面中添加设置 IE=edge,chrome=1的META信息详解 在 IIS 上实现 META 切换,针对所有页面 阅读全文
posted @ 2018-05-22 11:33 hy31337
摘要:可用js生成二维码,也可通过后台生成; 阅读全文
posted @ 2018-05-10 23:53 hy31337 阅读(1261) 评论(0) 推荐(0)
摘要:多类型匿名对象 var result = new { pages = 10, users = new System.Collections.ArrayList { new{id=1,name="2"}, new{id=2,name="3"} } }; result.users.Add(new { i 阅读全文
posted @ 2016-11-21 22:01 hy31337 阅读(5892) 评论(0) 推荐(0)
摘要:DLL文件下载 示例: 操作类: 经典示例: 其它实例: 阅读全文
posted @ 2016-07-26 18:57 hy31337 阅读(1653) 评论(0) 推荐(0)
摘要:/*Word、Excel先保存再输出-下载*/ strReportFilePath = Server.MapPath("~") + strReportFilePath; doc.Save(strReportFilePath); if (!string.IsNullOrEmpty(strReportF 阅读全文
posted @ 2016-05-30 22:24 hy31337 阅读(1720) 评论(0) 推荐(0)
摘要:大量数据写入数据库方法:SqlServer优化之批量插入(SqlBulkCopy、表值参数) #region 获取 本周、本月、本季度、本年 的开始时间或结束时间 /// <summary> /// 获取开始时间 /// </summary> /// <param name="TimeType">W 阅读全文
posted @ 2016-01-08 18:20 hy31337
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Runtime.Serialization.Json; using 阅读全文
posted @ 2015-09-21 23:41 hy31337 阅读(651) 评论(0) 推荐(0)
摘要:主要是通过ActiveX控件 从本地获取到MAC地址,传入到浏览器打开的网页中,再提交到服务器。 具体详解与步骤看文档中: 文件实例包下载 DotNetFX 文件夹附件文件:(可能安装时需用) dotnetfx.exe (.net Framework 2.0) instmsia.exe langpa 阅读全文
posted @ 2015-09-21 23:24 hy31337 阅读(4871) 评论(0) 推荐(0)
摘要:HTML的代码:(关键是要在form里设置enctype="multipart/form-data",这样才能在提交表单时,将文件以二进制流的形式传输到服务器)一、 public partial class test : System.Web.U... 阅读全文
posted @ 2015-05-27 17:11 hy31337 阅读(837) 评论(0) 推荐(0)
摘要:一、图片提交例:A端--提交图片protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string url = "ht... 阅读全文
posted @ 2015-05-26 14:01 hy31337 阅读(967) 评论(0) 推荐(0)
摘要:public static void RegisterRoutes(RouteCollection routes) { string suffix = string.Empty; routes.IgnoreRoute("{resource}.... 阅读全文
posted @ 2015-03-27 18:25 hy31337 阅读(271) 评论(0) 推荐(0)
摘要:///登录页面Hashtable haol = (Hashtable)Application["olTable"]; if (haol == null) { haol = new Hashtable(... 阅读全文
posted @ 2015-03-27 18:23 hy31337 阅读(557) 评论(3) 推荐(0)
摘要:C# SQL lon 经坐标 lat 纬坐标 lat 28.984223lon 112.92671 阅读全文
posted @ 2015-03-27 18:22 hy31337 阅读(996) 评论(0) 推荐(0)

.net求学者