摘要: 监控公司局域网的网站访问情况。 项目1: 新建类MonitorHttpModule.cs Code Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ ... 阅读全文
posted @ 2009-09-22 16:21 Angelo Dell'inferno 阅读(383) 评论(0) 推荐(0) 编辑
摘要: quote:Erik Lenaerts(http://www.dotnet6.com/blogs/erik_lenaerts/archive/2007/07/21/run-a-http-response-filter-together-with-an-ajax-update-panel.aspx)R... 阅读全文
posted @ 2009-02-17 17:34 Angelo Dell'inferno 阅读(1366) 评论(1) 推荐(0) 编辑
摘要: 要在GridView中动态绑定附件,如果附件存在且为图片时,显示该图片,并且建立超链接;如果附件不是图片,则只显示附件名称,建立超链接;Html 代码:span> asp:HyperLink ID="lnkAttachment" runat="server" NavigateUrl='' Targ... 阅读全文
posted @ 2008-06-02 12:27 Angelo Dell'inferno 阅读(3197) 评论(0) 推荐(0) 编辑
摘要: 当地址栏没有参数"id"时: Request.QueryString["ID"] == nullConvert.ToString(Request.QueryString["ID"]) == null注意这样会出错:Request.QueryString["ID"].ToString(); 当地... 阅读全文
posted @ 2008-05-21 15:07 Angelo Dell'inferno 阅读(1176) 评论(1) 推荐(0) 编辑
摘要: 在标签外侧添加: PRE>asp:Labelid="lblDescription"runat="server"Width="420px">asp:Label>PRE>在Page_Load中添加: this.lblDescription.Style.Add("word-break","break-al... 阅读全文
posted @ 2008-05-19 17:03 Angelo Dell'inferno 阅读(8534) 评论(1) 推荐(0) 编辑
摘要: 类: CheckCode.csCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1//----------------------------------... 阅读全文
posted @ 2008-05-14 17:53 Angelo Dell'inferno 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 由于项目需要制作程序发布的网站,需要手动选择服务端目录下的文件夹和文件。故制作该页面,并打算转为UserControl.页面代码: AppFileSelect.aspxCode highlighting produced by Actipro CodeHighlighter (freeware)ht... 阅读全文
posted @ 2008-05-14 09:15 Angelo Dell'inferno 阅读(1120) 评论(0) 推荐(0) 编辑
摘要: 使用UserControl实现。同时在用户控件上定义了委托,以实现与基页面的事件相结合。VS2005(Asp.net Ajax)前端代码: CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.C... 阅读全文
posted @ 2008-05-13 17:59 Angelo Dell'inferno 阅读(1789) 评论(0) 推荐(0) 编辑
摘要: /// /// 导出到Excel /// /// /// public static void DataGridViewToExcel(DataGridView dgv, string title) { if (dgv.DataSource == null || dgv.Columns... 阅读全文
posted @ 2008-03-04 16:09 Angelo Dell'inferno 阅读(2526) 评论(0) 推荐(0) 编辑
摘要: /// /// 获取计时器事件运行的时间间隔 /// /// 时间间隔 private double GetTimerInterval() { DateTime runTime = Convert.ToDateTime(System.Configuration.ConfigurationSet... 阅读全文
posted @ 2008-03-03 14:41 Angelo Dell'inferno 阅读(7112) 评论(1) 推荐(0) 编辑
摘要: 转自http://soft.zdnet.com.cn/software_zone/2007/0607/407672.shtml 封锁技术可以有效地解决并行操作的一致性问题,但也带来一些新的问题,即死锁和活锁的问题。 (1)活锁 如果事务T1封锁了数据对象R后,事务T2也请求封锁R,于是T2等待。接着... 阅读全文
posted @ 2008-02-29 16:02 Angelo Dell'inferno 阅读(3224) 评论(0) 推荐(0) 编辑
摘要: 页面验证未通过,需要跳转到Login页面,为防止Login页面被嵌入到IFrame中,需在Login页面的HTML源码的与之间加入如下代码,即可实现整个页面的跳转。 页面跳转是使用如下:Response.Write(""); 阅读全文
posted @ 2008-02-26 13:50 Angelo Dell'inferno 阅读(1136) 评论(0) 推荐(1) 编辑
摘要: 在存储过程中使用事务,以下为模板: CREATE PROCEDURE testProAS /**//* ------- 事务开始---------- */ BEGIN TRANSACTION tran_test /**//* -------- 保存事务----------*/ SAVE TRANS... 阅读全文
posted @ 2008-02-22 15:02 Angelo Dell'inferno 阅读(1492) 评论(0) 推荐(0) 编辑
摘要: --建立数据库连接,'test'为别名 exec sp_addlinkedserver 'test','','MSDASQL',NULL,NULL, 'DRIVER={SQL Server};SERVER=192.168.0.4;UID=developer;PWD=123456;' --数据库登录... 阅读全文
posted @ 2008-02-21 17:28 Angelo Dell'inferno 阅读(760) 评论(0) 推荐(0) 编辑
摘要: /// /// 强行杀Excel进程/// private static void KillProcess(){ System.Diagnostics.Process[] excelProc = System.Diagnostics.Process.GetProcessesByName("EXCEL... 阅读全文
posted @ 2008-02-21 10:34 Angelo Dell'inferno 阅读(696) 评论(0) 推荐(0) 编辑
摘要: 1. aspx页面端代码: 首页 上一页 下一页 尾页 页码: / 2. aspx.cs端代码: #region GridView分页 /// /// 页面选择操作 /// /// /// protected void PagerButton_Click(object sende... 阅读全文
posted @ 2007-12-24 10:41 Angelo Dell'inferno 阅读(1246) 评论(0) 推荐(0) 编辑
摘要: /// /// 将DataSet内容导入到Excel /// /// DataSet public static void FACTDataSetToExcel(System.Data.DataSet dsExport,string _fileName) { //保存文件名 string ... 阅读全文
posted @ 2007-12-20 09:52 Angelo Dell'inferno 阅读(822) 评论(1) 推荐(0) 编辑
摘要: string _fileName = HttpContext.Current.Server.MapPath("~\\report\\FactReports\\") + e.Item.Cells[0].Text.Trim(); //服务器端文件路径 //建立文件对象 FileStream myFil... 阅读全文
posted @ 2007-12-10 15:18 Angelo Dell'inferno 阅读(708) 评论(1) 推荐(0) 编辑
摘要: 取系统时间的日期部分: TRUNC(SYSDATE) to be continued..... 阅读全文
posted @ 2007-12-10 14:58 Angelo Dell'inferno 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 常用oracle函数SQL中的单记录函数1.ASCII返回与指定的字符对应的十进制数;SQL> select ascii('A') A,ascii('a') a,ascii('0') zero,ascii(' ') space from dual; A A ZERO SPACE--------- ... 阅读全文
posted @ 2007-12-06 13:07 Angelo Dell'inferno 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 形式 语法 结果 注释 数字 {0:N2} 12.36 数字 {0:N0} 13 货币 {0:c2} $12.36 货币 {0:c4} $12.3656 货币 "¥{0:N2}" ¥12.36 科学计数法 {0:E3} 1.23E+001 百分数 {0:P} 12.25% P and p prese... 阅读全文
posted @ 2007-12-06 12:45 Angelo Dell'inferno 阅读(838) 评论(0) 推荐(0) 编辑