摘要: 监控公司局域网的网站访问情况。项目1:新建类MonitorHttpModule.cs CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->namespaceHouseProgram.HttpModule{publicclassMonitorHttp...阅读全文
posted @ 2009-09-22 16:21 Angelo Dell'inferno 阅读(122) 评论(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)Run a Http Response Filter together with an Ajax Up...阅读全文
posted @ 2009-02-17 17:34 Angelo Dell'inferno 阅读(676) 评论(1) 编辑
摘要: 要在GridView中动态绑定附件,如果附件存在且为图片时,显示该图片,并且建立超链接;如果附件不是图片,则只显示附件名称,建立超链接;Html 代码:<span><asp:HyperLink ID="lnkAttachment" runat="server" NavigateUrl='<%# DataBinder.Eval(Container.DataItem,"Atta...阅读全文
posted @ 2008-06-02 12:27 Angelo Dell'inferno 阅读(1831) 评论(0) 编辑
摘要: 当地址栏没有参数"id"时:Request.QueryString["ID"] == nullConvert.ToString(Request.QueryString["ID"]) == null注意这样会出错:Request.QueryString["ID"].ToString();当地址栏有参数"id",但没有赋值的时候:Request.QueryString["ID"] == ""Reque...阅读全文
posted @ 2008-05-21 15:07 Angelo Dell'inferno 阅读(668) 评论(1) 编辑
摘要: 在<Label></Lable>标签外侧添加<pre></pre>:<PRE><asp:Labelid="lblDescription"runat="server"Width="420px"></asp:Label></PRE>在Page_Load中添加:this.lblDescription.Styl...阅读全文
posted @ 2008-05-19 17:03 Angelo Dell'inferno 阅读(4299) 评论(0) 编辑
摘要: 类:CheckCode.csCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1//----------------------------------------------------------------------2//RyanWei3//Da...阅读全文
posted @ 2008-05-14 17:53 Angelo Dell'inferno 阅读(152) 评论(0) 编辑
摘要: 由于项目需要制作程序发布的网站,需要手动选择服务端目录下的文件夹和文件。故制作该页面,并打算转为UserControl.页面代码:AppFileSelect.aspxCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1<%@PageLanguage...阅读全文
posted @ 2008-05-14 09:15 Angelo Dell'inferno 阅读(428) 评论(0) 编辑
摘要: 使用UserControl实现。同时在用户控件上定义了委托,以实现与基页面的事件相结合。VS2005(Asp.net Ajax)前端代码: CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1<%@ControlLanguage="C#"A...阅读全文
posted @ 2008-05-13 17:59 Angelo Dell'inferno 阅读(1044) 评论(0) 编辑
摘要: /// <summary> /// 导出到Excel /// </summary> /// <param name="dgv"></param> /// <param name="title"></param> public static void DataGridViewToExcel(DataGridView dgv, s...阅读全文
posted @ 2008-03-04 16:09 Angelo Dell'inferno 阅读(2049) 评论(0) 编辑
摘要: /// <summary> /// 获取计时器事件运行的时间间隔 /// </summary> /// <returns>时间间隔</returns> private double GetTimerInterval() { DateTime runTime = Convert.ToDateTime(System.Configuration.Conf...阅读全文
posted @ 2008-03-03 14:41 Angelo Dell'inferno 阅读(4597) 评论(1) 编辑
摘要: 转自http://soft.zdnet.com.cn/software_zone/2007/0607/407672.shtml 封锁技术可以有效地解决并行操作的一致性问题,但也带来一些新的问题,即死锁和活锁的问题。 (1)活锁 如果事务T1封锁了数据对象R后,事务T2也请求封锁R,于是T2等待。接着T3也请求封锁R。T1释放R上的锁后,系统首先批准了T3的请求,T2只得继续等待。接着T4也请求封锁...阅读全文
posted @ 2008-02-29 16:02 Angelo Dell'inferno 阅读(1721) 评论(0) 编辑
摘要: 页面验证未通过,需要跳转到Login页面,为防止Login页面被嵌入到IFrame中,需在Login页面的HTML源码的<body>与<form>之间加入如下代码,即可实现整个页面的跳转。 <body> <script language="javascript" type="text/javascript"> if (top.location !==...阅读全文
posted @ 2008-02-26 13:50 Angelo Dell'inferno 阅读(703) 评论(0) 编辑
摘要: 在存储过程中使用事务,以下为模板: CREATE PROCEDURE testProAS /**//* ------- 事务开始---------- */ BEGIN TRANSACTION tran_test /**//* -------- 保存事务----------*/ SAVE TRANSACTION tran_test /**//*...阅读全文
posted @ 2008-02-22 15:02 Angelo Dell'inferno 阅读(1117) 评论(0) 编辑
摘要: --建立数据库连接,'test'为别名 exec sp_addlinkedserver 'test','','MSDASQL',NULL,NULL, 'DRIVER={SQL Server};SERVER=192.168.0.4;UID=developer;PWD=123456;' --数据库登录 exec sp_addlinkedsrvlogin 'test','false',null,'...阅读全文
posted @ 2008-02-21 17:28 Angelo Dell'inferno 阅读(417) 评论(0) 编辑
摘要: /// <summary>/// 强行杀Excel进程/// </summary>private static void KillProcess(){ System.Diagnostics.Process[] excelProc = System.Diagnostics.Process.GetProcessesByName("EXCEL"); System.DateTime...阅读全文
posted @ 2008-02-21 10:34 Angelo Dell'inferno 阅读(399) 评论(0) 编辑
摘要: 1. aspx页面端代码: <div class="gv-footer"> <asp:LinkButton ID="btFirstPage" runat="server" CommandArgument="first" OnClick ="PagerButton_Click">首页</asp:LinkButton> <asp:LinkButton ID=...阅读全文
posted @ 2007-12-24 10:41 Angelo Dell'inferno 阅读(903) 评论(0) 编辑
摘要: /// <summary> /// 将DataSet内容导入到Excel /// </summary> /// <param name="dsExport">DataSet</param> public static void FACTDataSetToExcel(System.Data.DataSet dsExport,string _fileNa...阅读全文
posted @ 2007-12-20 09:52 Angelo Dell'inferno 阅读(485) 评论(1) 编辑
摘要: string _fileName = HttpContext.Current.Server.MapPath("~\\report\\FactReports\\") + e.Item.Cells[0].Text.Trim(); //服务器端文件路径 //建立文件对象 FileStream myFile = new FileStream(_fileName, FileMode.Open, FileAc...阅读全文
posted @ 2007-12-10 15:18 Angelo Dell'inferno 阅读(445) 评论(1) 编辑
摘要: 取系统时间的日期部分: TRUNC(SYSDATE) to be continued.....阅读全文
posted @ 2007-12-10 14:58 Angelo Dell'inferno 阅读(34) 评论(0) 编辑
摘要: 常用oracle函数SQL中的单记录函数1.ASCII返回与指定的字符对应的十进制数;SQL> select ascii('A') A,ascii('a') a,ascii('0') zero,ascii(' ') space from dual; A A ZERO SPACE--------- --------- --------- --------- 65 97 48 32 2.CH...阅读全文
posted @ 2007-12-06 13:07 Angelo Dell'inferno 阅读(98) 评论(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 present the same. 日期 {0:D} 2006年11月25日 日期 {0:d} 2006-11...阅读全文
posted @ 2007-12-06 12:45 Angelo Dell'inferno 阅读(696) 评论(0) 编辑