2009年6月10日
摘要: public static string GetColorString(string old, string key) { char[] sp = { ' ', '|', '\'', ';', ':', '-', '(', ')' }; string[] arrkey = key.Split(sp); foreach (string temp in arrkey) { if (temp != ""... 阅读全文
posted @ 2009-06-10 10:50 collinye 阅读(151) 评论(0) 推荐(0) 编辑
  2009年5月13日
摘要:  <div style="z-index: 2005; height: 100%; width: 100%; position: fixed; left: 0px;        right: 0px; background-color: #D4D0C8;" id="Mask"       ... 阅读全文
posted @ 2009-05-13 16:23 collinye 阅读(364) 评论(0) 推荐(0) 编辑
摘要: <script language="JavaScript" type="text/javascript" <!-- // 说明:用 JavaScript 实现网页图片等比例缩放 function DrawImage(ImgD,maxwidth,maxheight){ var image=new Image(); image.src=ImgD.src; if(image.width0... 阅读全文
posted @ 2009-05-13 16:20 collinye 阅读(294) 评论(0) 推荐(0) 编辑
  2009年5月7日
摘要: #note{ padding:5px; z-index:1000; border:solid 2px #b0b0b0; background-color:#b0b0b0; width:100px; position:absolute; left:-100px; position:fixed !important; top/**/:0px; position:absolute; z-index:1... 阅读全文
posted @ 2009-05-07 16:44 collinye 阅读(108) 评论(0) 推荐(0) 编辑
  2009年4月29日
摘要: 我的vs2008今天忽然不能添加web引用了,报“web服务枚举组件不可用”,试着更新原来的web引用,报“此计算机上没有安装枚举web引用所需的组件,请重新安装visual studio”。解决办法:在命令行下执行“devenv /resetskippkgs ”。运行后就可以了。下执行̶... 阅读全文
posted @ 2009-04-29 10:09 collinye 阅读(648) 评论(0) 推荐(0) 编辑
  2009年4月20日
摘要: ASP.NET级别的URL Rewrite组件的原理很简单,其实只是监听BeginRequest事件,并且根据配置来决定目标URL。在我之前接触过的项目中,发现使用URLRewriter作为URL Rewrite组件的频率非常高,我想可能是因为那是微软提供的东西吧。  如果要使用URLRewriter,首先自然就是在web.config中配置一个HttpModule:<httpModules... 阅读全文
posted @ 2009-04-20 19:10 collinye 阅读(425) 评论(0) 推荐(0) 编辑
摘要: //url转链接 //2008-7-7Regex UrlRegex = new Regex(@"((http|ftp|https):\/\/(([\w.]+\/?)[\S]*))|((www.)([\w.]+\/?)\S*)");Text =UrlRegex.Replace(Text, "<a href=\"http://$3$5\"target=\"_blank\" style=... 阅读全文
posted @ 2009-04-20 18:35 collinye 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 1. 起因:由于IIS站点设置了域名主机头,且装了.net framework3.5 sp1。2.现象:出现的错误"unable to start debugging on the webserver. An authentication erroroccurred while communicating with the web server.3.解决方案:已找到解决方法,方法1修改以... 阅读全文
posted @ 2009-04-20 18:30 collinye 阅读(647) 评论(0) 推荐(1) 编辑
  2009年3月19日
摘要: 场景:微软的windows xp操作系统,ctrl+alt+del键都会弹出一个windows任务管理器(这时不关闭这个任务管理器),继续ctrl+alt+del键还是一个windows任务管理器。鉴于本人水平有限,上面的场景举例可能不合适,但是很接近一个基本的设计模式:单例模式。Code is cheap.下面用c#代码模拟出一个类似任务管理器的创建:using System;///&... 阅读全文
posted @ 2009-03-19 13:14 collinye 阅读(408) 评论(0) 推荐(0) 编辑