2008年8月14日
摘要: 众所周知,要保护一个页面,最基础的就是要屏蔽右键。而现在网页上用得最多的是function click(),即下面这段代码: Code 〈script〉 function click(){ if(event.button==2){ alert( '本网站欢迎您 !!'); } } document.onmousedown=click 〈/script〉   但是这种屏蔽方法的破解方法也是众所周知的。那就是连续单击鼠标左键和右键便又可以看到右键菜单了。但是,我见过一种很好的屏蔽右键的方法。它的原理和上面所说的不同。它并不是用JS来编写的脚本,而是利用定义网页属性来起到限制的作用。而且,在屏蔽中应该尽量的避开使用JS脚本。因为只要浏览者把IE里的javascript脚本禁用了。那么一切屏蔽都白费。 阅读全文
posted @ 2008-08-14 18:01 Benny_NET 阅读(545) 评论(0) 推荐(0)
  2008年7月22日
摘要: 1,在发布网站时,asp.net总会默认的给请求网页添加一个 "X-AspNet-Version:版本号"的Header,有时感觉很不爽,就像把这个header去掉,哈哈,其实很简单,只需要在当前网站的web.config文件中的中添加 Code highlighting produced by Actipro CodeHighlighter (freeware)http://w... 阅读全文
posted @ 2008-07-22 16:12 Benny_NET 阅读(164) 评论(0) 推荐(0)
摘要: 这几天搞IIS7,发现这篇文章不错,特此记录一下。 ASP.NET 2.0 applications on IIS 7.0 are hosted using the ASP.NET Integrated mode by default. This new mode enables a myriad of exciting scenarios including using super-valuable ASP.NET features like Forms Authentication for your entire Web site, and developing new ASP.NET modules to do things like URL rewriting, authorization, logging, and more at the IIS level. For more information about the ASP.NET Integration in IIS 7.0, see: ASP.NET Integration with IIS7. 阅读全文
posted @ 2008-07-22 15:39 Benny_NET 阅读(766) 评论(0) 推荐(0)
  2008年7月13日
摘要: 由于项目需要,自己写了一个根据一个数据集方便导出EXCEL电子表格的工具类。简单记录以下。 用法如下: 1 ExcelWorkbook excel= new ExcelWorkbook(); 2 excel.FileName = "导出文件名称"; 3 4 Worksheet w= new Work... 阅读全文
posted @ 2008-07-13 14:05 Benny_NET 阅读(626) 评论(4) 推荐(0)
  2008年6月30日
摘要: 在.net 1.1 、1.0中,WEB Service 的返回或者输入参数不能是 DataTable,原因就是 DataTable 不象DataSet那样支持序列化。在.net 1.1中,我们解决这个问题的方法就是使用DataSet。 附:.net 1.1 中使用DataTable作为WEB Service 返回值会报以下异常: 类型 System.Compon... 阅读全文
posted @ 2008-06-30 16:29 Benny_NET 阅读(282) 评论(1) 推荐(0)