随笔分类 -  .Net技术

.Net技术
摘要:在iis布署出现如下错误: 解决方法: 1、查看bin目录下是否有该dll文件,没有就添加该dll文件至bin目录下。 2、在web.config文件中添加如下配置: <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1 阅读全文
posted @ 2020-12-01 09:30 大空白纸 阅读(1421) 评论(0) 推荐(0) 编辑
摘要:问题描述 在传统的ASP.NET Web Api 应用程序开发中,我们处理全局异常的方法通常是实现一个ExceptionFilterAttribute的子类,如下: public class ErrorHandlingFilter : ExceptionFilterAttribute { publi 阅读全文
posted @ 2020-08-12 15:59 大空白纸 阅读(1024) 评论(0) 推荐(0) 编辑
摘要:1、加入NPOI 程序集,使用nuget添加程序集 2、引用NPOI程序集 3、设置表格样式 4、excel加载图片 LoadImage 方法 5、导出excel 阅读全文
posted @ 2019-04-29 15:43 大空白纸 阅读(2132) 评论(0) 推荐(0) 编辑
摘要:1、导入命名空间: 2、如何打开已有excel文档,或者创建一个新的excel文档 若打开已有excel,把“xxx”替换成该excel的文件路径; 注:若新建一个excel文档,“xxx”替换成true即可;不过这里新建的excel文档默认只有一个sheet。 3、 取得、删除和添加sheet 3 阅读全文
posted @ 2019-04-28 13:55 大空白纸 阅读(11698) 评论(0) 推荐(1) 编辑
摘要:程序方面: 1.Windows 中的换行符"\r\n" 2.Unix/Linux 平台换行符是 "\n"。 3.MessageBox.Show() 的换行符为 "\n" 4.Console 的换行符为 "\n" 为保持平台的通用性,可以用系统默认换行符 System.Environment.NewL 阅读全文
posted @ 2017-08-10 16:42 大空白纸 阅读(6542) 评论(0) 推荐(0) 编辑
摘要:所谓流媒体是指采用流式传输的方式在Internet播放的媒体格式。和需要将整个视频文件全部下载之后才能观看的传统方式相比,流媒体技术是通过将视频文件经过特殊的压缩方式分成一个个的小数据包,由视频服务器向用户计算机连续、实时传送,用户不需要将整个视频文件完全下载之后才能观看,只需经过短暂的缓冲就可以观 阅读全文
posted @ 2017-02-15 15:50 大空白纸 阅读(980) 评论(0) 推荐(0) 编辑
摘要:效果如下: 1、无LOGO的二维码: 2、含有LOGO的二维码: 一、下载QrCode程序集: 使用的程序集有: 下载地址: http://zxingnet.codeplex.com/ 二、QRCodeHelper 工具类: 测试代码: 阅读全文
posted @ 2016-12-27 14:10 大空白纸 阅读(3949) 评论(2) 推荐(0) 编辑
摘要:/// /// 将DateTime时间格式转换为Unix时间戳格式 /// /// DateTime时间 /// 精度:Seconds-秒,Milliseconds-毫秒 /// public static long ToUnixTimeStamp(this DateTime dateTim... 阅读全文
posted @ 2016-08-09 09:55 大空白纸 阅读(1857) 评论(0) 推荐(0) 编辑
摘要:一:下载log4net的程序集 下载地址: http://logging.apache.org/log4net/ 使用情况: 二、配置文件设置 Config配置文件log4net.xml <?xml version="1.0" encoding="utf-8" ?> <configuration> 阅读全文
posted @ 2016-03-10 14:35 大空白纸 阅读(367) 评论(0) 推荐(0) 编辑
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Security.Cryptography;using System.Web;namespace GiftWeb.Util{ public ... 阅读全文
posted @ 2015-06-02 11:46 大空白纸 阅读(2028) 评论(0) 推荐(0) 编辑
摘要:public class Encrypts { /// /// 构造方法 /// public Encrypts() { } /// /// 使用缺... 阅读全文
posted @ 2015-04-08 09:47 大空白纸 阅读(291) 评论(0) 推荐(0) 编辑
摘要:1、OracleHelperusing System;using System.Data;using System.Configuration;using System.Linq;using System.Web;using System.Web.Security;using System.Web.... 阅读全文
posted @ 2015-03-30 17:41 大空白纸 阅读(574) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2014-11-25 17:54 大空白纸 阅读(271) 评论(0) 推荐(0) 编辑
摘要:1.下载 ffmpeg 工具using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.S... 阅读全文
posted @ 2014-10-16 10:46 大空白纸 阅读(1594) 评论(0) 推荐(0) 编辑
摘要:void test2() { Process process = new Process(); //C:\\Users\\Administrator\\Desktop\\ffmpeg\\bin\\ffmpeg.exe ... 阅读全文
posted @ 2014-10-15 18:16 大空白纸 阅读(680) 评论(0) 推荐(0) 编辑
摘要:1.下载print2flash3 并且安装print2flash32.转换工具类(1)需要导入using Print2Flash3; 这个程序集using System;using System.Data;using System.Configuration;using System.Linq;us... 阅读全文
posted @ 2014-10-15 16:39 大空白纸 阅读(856) 评论(0) 推荐(0) 编辑
摘要:1.登录页面login.aspx 无标题页 登录名 密码 记住密码 ... 阅读全文
posted @ 2014-10-14 17:36 大空白纸 阅读(2921) 评论(0) 推荐(1) 编辑
摘要:首先添加命名空间using System.Net.Mail; /// /// 发送邮件 /// /// /// protected void ForMail(string name, string mail) ... 阅读全文
posted @ 2014-10-08 16:32 大空白纸 阅读(241) 评论(0) 推荐(0) 编辑
摘要:Ctrl+E,D ----格式化全部代码Ctrl+E,F ----格式化选中的代码CTRL + SHIFT + B生成解决方案CTRL + F7 生成编译CTRL + O 打开文件CTRL + SHIFT + O打开项目CTRL + SHIFT + C显示类视图窗口F4 显示属性窗口SHIFT + ... 阅读全文
posted @ 2014-09-22 16:46 大空白纸 阅读(297) 评论(0) 推荐(0) 编辑
摘要:AspNetPager分页控件解决了分页中的很多问题,直接采用该控件进行分页处理,会将繁琐的分页工作变得简单化,效果如下:下面是我如何使用AspNetPager控件进行分页处理的详细代码:1.首先到www.webdiyer.com下载最新的AspNetPager.dll,直接在vs2005中添加引用... 阅读全文
posted @ 2014-08-08 23:46 大空白纸 阅读(241) 评论(0) 推荐(0) 编辑