摘要: 最近在程序里发现了大量的错误日志,很大一部分是在try-catch捕捉Response.Redirect时记录的"正在中止进程"。在网上google了一把后,总结如下:如果使用 Response.End、Response.Redirect 或 Server.Transfer 方法,将出现 ThreadAbortException 异常。您可以使用 try-catch 语句捕获此异常。 Response.End 方法终止页的执行,并将此执行切换到应用程序的事件管线中的 Application_EndRequest 事件。不执行 Response.End 后面的代码行。 此问题出现在 Respon 阅读全文
posted @ 2008-12-05 09:55 litsword 阅读(759) 评论(1) 推荐(0) 编辑
摘要: 通过灰色滤镜来实现,可惜目前只能在IE里用,Firefox还没有找到对应的方法...CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--style="filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);" 阅读全文
posted @ 2008-05-21 14:35 litsword 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 1、从Xml中提取Encoding值的 ]*Encoding=('|")?(?[^>\s'"]*)('|")?[^>]*> 2、过滤所有HTML标签取纯文本 Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->/**//// ... 阅读全文
posted @ 2008-05-04 17:15 litsword 阅读(391) 评论(0) 推荐(0) 编辑
摘要: 在各大论坛间google了一整天,东拼西凑的终于调试成功了。 首先,定义一个全局变量用于识别当前浏览器是否IE 全局变量 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->var _isIe = navigator.appName == "Micros... 阅读全文
posted @ 2008-04-28 10:00 litsword 阅读(2735) 评论(1) 推荐(1) 编辑
摘要: 示例代码: Javascript Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 补充: innerWidth/Height:表示元素内容区域的宽度/高度; offsetWidth/Height:表示元素的实际宽度/高度 在firefo... 阅读全文
posted @ 2008-04-25 14:33 litsword 阅读(498) 评论(2) 推荐(0) 编辑
摘要: 用InstallUtil安装Windows服务 1. 打开Visual Studio .NET命令提示2. 改变路径到你项目所在的bin\Debug文件夹位置(如果你以Release模式编译则在bin\Release文件夹)3. 执行命令“InstallUtil.exe MyWindowsService.exe”注册这个服务,使它建立一个合适的注册项。4. 右击桌面上“我的电脑”,选择“管理”就可以打计算机管理控制台5. 在“服务和应用程序”里面的“服务”部分里,你可以发现你的Windows服务已经包含在服务列表当中了6. 右击你的服务选择启动就可以启动你的服务了  在每次需要修改Window 阅读全文
posted @ 2008-03-26 18:06 litsword 阅读(330) 评论(0) 推荐(0) 编辑
摘要: VBScript Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> JavaScript Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.Code... 阅读全文
posted @ 2008-03-11 10:08 litsword 阅读(5619) 评论(0) 推荐(0) 编辑