摘要: NOPI 下载地址http://npoi.codeplex.com/ 它是 免费的 NET平台 导出 导入 Excel 组件优点 :无需安装office ,包含了office 绝大多数功能(单元格样式,数据格式,公式等等)1. 创建 工作表 输出Excel /// 带模板导出Excel文件 ... 阅读全文
posted @ 2014-11-12 14:35 巴顿道儿 阅读(638) 评论(0) 推荐(0) 编辑
摘要: 引用 jquery.form.js 文件利用JQuery Input file 实现单文件上传效果如下初始按钮点击按钮 弹出 选中框页面代码:.file{ filter:alpha(opacity=0); -moz-opacity:0; opacity: 0; width: ... 阅读全文
posted @ 2014-11-12 10:04 巴顿道儿 阅读(2925) 评论(0) 推荐(0) 编辑
摘要: --A.分离EXEC sp_detach_db @dbname = '库名'--B.删除日志文件--从数据库地址中删除 库名_Log 日志文件--C.再附加EXEC sp_attach_single_file_db @dbname = '库名', @physname = 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\库名.mdf' 阅读全文
posted @ 2014-03-31 16:05 巴顿道儿 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 一些常用SQL的总结 patIndex ,where ,decimal 等函数的巧用--1.charIndex 精确查找字符串的位置declare @charIndex varchar(500)set @charIndex='MicrosoftSQLServerManagement'--返回字符串中... 阅读全文
posted @ 2013-12-10 18:04 巴顿道儿 阅读(1014) 评论(0) 推荐(1) 编辑
摘要: 最近项目用到行列转换,总结了一下 转换前后数据结构 转换前: 转换后: 一. 创建表结构,插入数据--创建数据表CREATE TABLE [dbo].[RowColumn]( [UserID] [int] NULL, [UserName] [varchar](50) NULL, [Subject1] [int] NULL, [Subject2] [int] NULL, [Subject3] [int] NULL, [Subject4] [int] NULL, [Subject5] [int] NULL) ON [PRIMARY]--插入时间inse... 阅读全文
posted @ 2013-12-10 16:01 巴顿道儿 阅读(3088) 评论(0) 推荐(0) 编辑
摘要: 最近做了几个小项目用到了一些 Window 网络命令 ,今天总结一下一.SQLServer2008 开启xp_cmdshell 权限(截图对应开启时经常遇到该权限不存在的问题) 1. 2. 3. 4.EXEC sp_configure 'show advanced options', 1GORECONFIGUREGOEXEC sp_configure 'xp_cmdshell', 1GOreconfigure二.常用的网络命令(开启xp_cmdshell)--net use 将计算机和其它网络计算机建立共享资料链接或者断开--建立共享资源链接--执行命令之前数据 阅读全文
posted @ 2013-12-09 14:39 巴顿道儿 阅读(3500) 评论(1) 推荐(0) 编辑
摘要: EXEC sp_configure 'show advanced options', 1 GO RECONFIGURE GO EXEC sp_configure 'xp_cmdshell', 1 GO sp_configure 'SQL Mail XPs', 1 go exec sp_configure 'Ad Hoc Distributed Queries',1 go reconfigure USE [master] GO EXEC master.dbo.sp_MSset_oledb_prop N'... 阅读全文
posted @ 2013-11-04 16:43 巴顿道儿 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 在web系统中页面验证是不可少的,在页面比较多的系统中Session统一用户验证是必须的。httphander 与httpmodule 输出区别 httphander 是有返回响应的,会重写输出结果 httpmodule 无响应结果输出,不会影响页面输出 下面是利用HttpModule的Session统一验证public class PageBase : IHttpModule{ public void Dispose() { } public void Init(HttpApplication context) { //实现事件 context.... 阅读全文
posted @ 2013-11-04 09:59 巴顿道儿 阅读(439) 评论(0) 推荐(0) 编辑
摘要: Javascript Bom 对象 阅读全文
posted @ 2013-03-02 13:47 巴顿道儿 阅读(210) 评论(0) 推荐(0) 编辑
摘要: Request.UrlReferrer 获取页面来源URL 阅读全文
posted @ 2013-02-28 16:52 巴顿道儿 阅读(2115) 评论(0) 推荐(0) 编辑