<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_leeolevis_分类_Web志</title><id>http://feed.cnblogs.com/blog/u/51427/category/315267/rss</id><updated>2012-06-03T19:44:14Z</updated><generator>feed.cnblogs.com</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/leeolevis/category/315267.html"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/51427/category/315267/rss"/><entry><id>http://www.cnblogs.com/leeolevis/archive/2011/03/13/1982720.html</id><title type="text">记录：批量Resource转Resx</title><summary type="text">staticvoidMain(string[]args){stringpResources=@"D:\Resource\";DirectoryInfodiResources=newDirectoryInfo(pResources);varqueryList=diResources.GetFiles();foreach(vararyinqueryList){TestToResources(pResources+ary.Name,@"D:\ResX\"+ary.Name.Replace("resources.","")</summary><published>2011-03-13T06:13:00Z</published><updated>2011-03-13T06:13:00Z</updated><author><name>leeolevis</name><uri>http://www.cnblogs.com/leeolevis/</uri></author><link rel="alternate" href="http://www.cnblogs.com/leeolevis/archive/2011/03/13/1982720.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/leeolevis/archive/2011/03/13/1982720.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/leeolevis/archive/2011/03/01/1968030.html</id><title type="text">异步邮件发送</title><summary type="text">usingSystem;usingSystem.Net.Mail;usingSystem.Collections.Specialized;namespaceMS.Core.Common{publicsealedclassSMTPEmailer{#region私有常量privatestaticstring_fromAddress="Jay.Sky001@163.com";privatestaticstring_fromAlias="MrVis";privatestaticstring_toAlias="DearFriends";priv</summary><published>2011-03-01T07:06:00Z</published><updated>2011-03-01T07:06:00Z</updated><author><name>leeolevis</name><uri>http://www.cnblogs.com/leeolevis/</uri></author><link rel="alternate" href="http://www.cnblogs.com/leeolevis/archive/2011/03/01/1968030.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/leeolevis/archive/2011/03/01/1968030.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/leeolevis/archive/2010/12/20/1911579.html</id><title type="text">分享一个对象序列化为XML和反序列化的扩展方法</title><summary type="text">Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--&gt; publicstaticclassXmlSerializerExtensions{#regionPrivatefieldsprivatestaticreadonlyDictionary&lt;RuntimeTypeHandle,XmlSerializer&gt;ms_serializers=newDictionary&lt;RuntimeTypeHandle,XmlSerializer&gt;</summary><published>2010-12-20T08:40:00Z</published><updated>2010-12-20T08:40:00Z</updated><author><name>leeolevis</name><uri>http://www.cnblogs.com/leeolevis/</uri></author><link rel="alternate" href="http://www.cnblogs.com/leeolevis/archive/2010/12/20/1911579.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/leeolevis/archive/2010/12/20/1911579.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/leeolevis/archive/2010/12/20/1911551.html</id><title type="text">将Excel数据批量插入数据库的常用方法</title><summary type="text">一、结合EntityFramework进行的简单实现 staticvoidLoadExcel(){stringfilePath=@"E:\Excel目录\";LoadFileTree(filePath);}staticvoidLoadFileTree(stringfilePath){stringconnString="server=localhost;uid=sa;pwd=qaz~123;database=MedicalSearch";System.IO.DirectoryInfodi=newDirectoryInfo(filePath);var_que</summary><published>2010-12-20T08:25:00Z</published><updated>2010-12-20T08:25:00Z</updated><author><name>leeolevis</name><uri>http://www.cnblogs.com/leeolevis/</uri></author><link rel="alternate" href="http://www.cnblogs.com/leeolevis/archive/2010/12/20/1911551.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/leeolevis/archive/2010/12/20/1911551.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/leeolevis/archive/2010/12/07/1898917.html</id><title type="text">关于HTML生成PDF文件</title><summary type="text">原文：http://blog.csdn.net/nlx0201/archive/2010/09/15/5885711.aspx 又是引用第三方DLL的一篇方法，后来建议作者用Reflector反编译提出方法了。 之前看过一些通过C#代码生成PDF文件的方式，用得最多的IText可以实现HTML页面生成PDF文件（也有一些人在机器上装了PDF打印机，使用打印来生成PDF），不过我个人觉得IText生成PDF的方法比较复杂，而在相当一段时间内查看资料后，发现有另外一个插件可以更好的控制HTML生成PDF文件。具体方法介绍如下：首先，下载一个ABCpdf .NET 7.0，下载地址：http://.</summary><published>2010-12-07T04:44:00Z</published><updated>2010-12-07T04:44:00Z</updated><author><name>leeolevis</name><uri>http://www.cnblogs.com/leeolevis/</uri></author><link rel="alternate" href="http://www.cnblogs.com/leeolevis/archive/2010/12/07/1898917.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/leeolevis/archive/2010/12/07/1898917.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/leeolevis/archive/2010/12/01/1893337.html</id><title type="text">挖掘经典：几乎被人遗忘的HTML七种用法</title><summary type="text">当今的WEB领域，新概念、新技术不断涌现 -- WEB2.0、AJAX、HTML5.0... ... 但在几乎被我们忽略的HTML和XHTML里，还有许多并不为人所知的，但却非常有用的一些TAG 以下就是其中的七种用法： 一、元素分组：&lt;fieldset&gt;、&lt;legend&gt; 示例： 1&lt;fieldset&gt;2&lt;legend&gt;健康信息：&lt;/legend&gt;3&lt;form&gt;4&lt;label&gt;身高：&lt;inputtype="text"/&gt;&lt;/label&gt;5&lt;label&gt;体</summary><published>2010-12-01T06:08:00Z</published><updated>2010-12-01T06:08:00Z</updated><author><name>leeolevis</name><uri>http://www.cnblogs.com/leeolevis/</uri></author><link rel="alternate" href="http://www.cnblogs.com/leeolevis/archive/2010/12/01/1893337.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/leeolevis/archive/2010/12/01/1893337.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/leeolevis/archive/2010/11/22/1883994.html</id><title type="text">用 IIS 7、ARR 與 Velocity 建设高性能的大型网站</title><summary type="text">本帖是研讨会中的一些杂记，搭配一些官方的文档，经整合归纳后，介绍 IIS 7 如何搭配新一代的 ARR (Application Request Routing)，建置Server Farm 并达到比过去NLB 更优的Load Balancing 功能，此外还介绍微软新一代的分布式缓存技术 Velocity。-------------------------------------------------------------------------------------------------------过去及目前 Windows Server 中的 NLB (Network Load </summary><published>2010-11-22T03:55:00Z</published><updated>2010-11-22T03:55:00Z</updated><author><name>leeolevis</name><uri>http://www.cnblogs.com/leeolevis/</uri></author><link rel="alternate" href="http://www.cnblogs.com/leeolevis/archive/2010/11/22/1883994.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/leeolevis/archive/2010/11/22/1883994.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/leeolevis/archive/2010/08/24/1807693.html</id><title type="text">利用LINQ读行文本&amp;amp;去重复</title><summary type="text">Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--&gt;1staticprivatevoidGetOneText(stringfilePath)2{3using(StreamReadersr=newStreamReader(filePath,Encoding.GetEncoding("gb2312")))4{5List&lt;string&gt;listQuery=newList&lt;string&gt;();6for(stri</summary><published>2010-08-24T15:24:00Z</published><updated>2010-08-24T15:24:00Z</updated><author><name>leeolevis</name><uri>http://www.cnblogs.com/leeolevis/</uri></author><link rel="alternate" href="http://www.cnblogs.com/leeolevis/archive/2010/08/24/1807693.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/leeolevis/archive/2010/08/24/1807693.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/leeolevis/archive/2010/08/11/1797119.html</id><title type="text">异常处理准则</title><summary type="text">在开发应用程序的时候，异常处理是非常的重要的，我找到一些异常处理准则，将它共享出来，如有不同意见，欢迎提出来一起探讨。1、决不“catch”一个Exception，却什么也不处理。如果您隐藏了异常，你永远不会知道是否发生过异常。 2、如果产生Exception，给用户提供一个友好的信息，但记录与有关错误的所有可能的细节，包括它的发生时间，方法和类的名字等实际的错误信息。3、始终捕获特定的异常，而不是一般的异常和系统异常。 4、你可以有一个应用程序级（线程级）的错误处理程序，您可以用它处理所有一般异常。在一个'意外一般错误''中，这个错误处理程序应该捕获该异常并记录他，除</summary><published>2010-08-11T02:22:00Z</published><updated>2010-08-11T02:22:00Z</updated><author><name>leeolevis</name><uri>http://www.cnblogs.com/leeolevis/</uri></author><link rel="alternate" href="http://www.cnblogs.com/leeolevis/archive/2010/08/11/1797119.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/leeolevis/archive/2010/08/11/1797119.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/leeolevis/archive/2010/07/13/1776521.html</id><title type="text">Linq to SQL 加注Data Annotation在 Asp.Net MVC2中的应用</title><summary type="text">首先我们来做一个比较，自定义Model加Annotation，如表1所示：图表1：Product Class 的定义Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--&gt; 1 public class Product 2 { 3 [DisplayName("Product Name")] 4 [Required(ErrorMessage="Product Name is Required.")] 5 [Str</summary><published>2010-07-13T07:31:00Z</published><updated>2010-07-13T07:31:00Z</updated><author><name>leeolevis</name><uri>http://www.cnblogs.com/leeolevis/</uri></author><link rel="alternate" href="http://www.cnblogs.com/leeolevis/archive/2010/07/13/1776521.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/leeolevis/archive/2010/07/13/1776521.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/leeolevis/archive/2010/07/13/1776509.html</id><title type="text">Linq之动态排序（字符传入）</title><summary type="text">Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--&gt;staticclassProgram{staticvoidMain(string[]args){string[]array={"aaa","bb","c"};foreach(variteminarray.AsQueryable().OrderBy("Length")){Console.WriteLine(item);</summary><published>2010-07-13T07:18:00Z</published><updated>2010-07-13T07:18:00Z</updated><author><name>leeolevis</name><uri>http://www.cnblogs.com/leeolevis/</uri></author><link rel="alternate" href="http://www.cnblogs.com/leeolevis/archive/2010/07/13/1776509.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/leeolevis/archive/2010/07/13/1776509.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/leeolevis/archive/2010/07/09/1774491.html</id><title type="text">EneityFramework+DomainDataSource+Silverlight完成数据读取分页排序与修改</title><summary type="text">关于EF、SL、DomainDataSource的说明园子上够多了，这儿就不多说了。 1.安装VS2010与Silverlight 4 Tools…… 2.打开VS2010,新键Silverlight项目,如图一所示:图1.新键项目 注:请选中"启用WCF RIA服务"的CheckBox. 建立好项目后,解决方案里的文件如图2所示:图2.解决方案文件结构 3.在SilverlightApplication.Web里,添加Entity Framework的数据库映射文件,这儿我以自己数据库的一个表所为示例,如图3与图3所示:图3.新建"Ado.Net实体数据模型&amp;q</summary><published>2010-07-09T08:53:00Z</published><updated>2010-07-09T08:53:00Z</updated><author><name>leeolevis</name><uri>http://www.cnblogs.com/leeolevis/</uri></author><link rel="alternate" href="http://www.cnblogs.com/leeolevis/archive/2010/07/09/1774491.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/leeolevis/archive/2010/07/09/1774491.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/leeolevis/archive/2010/07/09/1774468.html</id><title type="text">Google ProtocolBuffer.net简介与使用</title><summary type="text">protobuf-net是Google的ProtocolBuffer的.net实现。ProtocolBuffer是用于结构化数据串行化的灵活、高效、自动的方法，有如XML，不过它更小、更快、也更简单。你可以定义自己的数据结构，然后使用代码生成器生成的代码来读写这个数据结构。你甚至可以在无需重新部署程序的情况下更新数据结构。 引用protobuf-net.dll组件1、能过特性定义ProtoBuf格式的类[ProtoContract]public class User{ [ProtoMember(1, IsRequired = true)] public int UserID { get; s.</summary><published>2010-07-09T08:27:00Z</published><updated>2010-07-09T08:27:00Z</updated><author><name>leeolevis</name><uri>http://www.cnblogs.com/leeolevis/</uri></author><link rel="alternate" href="http://www.cnblogs.com/leeolevis/archive/2010/07/09/1774468.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/leeolevis/archive/2010/07/09/1774468.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/leeolevis/archive/2010/07/04/1770707.html</id><title type="text">单元测试之道（使用NUnit）</title><summary type="text">首先来看下面几个场景你是否熟悉 1、你正在开发一个系统，你不断地编码-编译-调试-编码-编译-调试……终于，你负责的功能模块从上到下全部完成且编译通过！你长出一口气，怀着激动而又忐忑的心情点击界面上的按钮，顿时你刚刚的轻松感烟消云散：系统无法正常工作，你想读的数据显示不出来，你想存的东西也送不到数据库……于是，你再次回到IDE里，设断点、调试、一层一层跟踪，当你精疲力尽终于将数据送到数据库里，你又发现了其它问题，于是你继续设断点、调试、编译、调试…… 2、你狂躁地敲击着键盘和鼠标，咒骂着不断出现的bug：啊？这里怎么没返回值啊！哎？这里不该是0啊！不对啊，这里怎么没数据……你永远不知道还有多少</summary><published>2010-07-03T16:55:00Z</published><updated>2010-07-03T16:55:00Z</updated><author><name>leeolevis</name><uri>http://www.cnblogs.com/leeolevis/</uri></author><link rel="alternate" href="http://www.cnblogs.com/leeolevis/archive/2010/07/04/1770707.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/leeolevis/archive/2010/07/04/1770707.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/leeolevis/archive/2010/06/12/1756841.html</id><title type="text">提高软件测试能力的19条建议</title><summary type="text">原文地址: Cheezburgers and Testing Advice作者：Alan Myrvold，软件安全高级测试工程师 译者注: 本文主要面向软件测试的初入门者，但对有经验的软件测试工程师也应有益。 我起初准备自己写10条建议给刚入门的软件测试员们。但之后我看了lolcats/icanhascheezburger 上的名人Ben Huh的一段演讲。Ben指出，有了互联网，信息成了免费资源，但组织，编辑，以及表达却都需要技巧。受Ben和cheezburger网站的启发，我请求60名成功的软件测试工程师每人为刚入门的测试人员提出三条建议。其中的40多名答复了我，使我最终有了一个长达100</summary><published>2010-06-12T02:27:00Z</published><updated>2010-06-12T02:27:00Z</updated><author><name>leeolevis</name><uri>http://www.cnblogs.com/leeolevis/</uri></author><link rel="alternate" href="http://www.cnblogs.com/leeolevis/archive/2010/06/12/1756841.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/leeolevis/archive/2010/06/12/1756841.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/leeolevis/archive/2010/06/08/1754211.html</id><title type="text">FireBug结合System.Net的数据抓取</title><summary type="text">以前一直用微软的Fiddler，现在受同事飞鸟（前端）的影响开始用FireFox的FireBug了，在此记录一下 打开FireFox，F12开启Firebug，在IP138的搜索页面搜一条合法数据 以前URL好像不显示参数的，不过也好，看起来直观-。-1ASCIIEncodingencoding=newASCIIEncoding();2stringpostData="ip="+strId;3postData+=("&amp;action="+strPassword);45byte[]data=encoding.GetBytes(postData);67H</summary><published>2010-06-08T10:11:00Z</published><updated>2010-06-08T10:11:00Z</updated><author><name>leeolevis</name><uri>http://www.cnblogs.com/leeolevis/</uri></author><link rel="alternate" href="http://www.cnblogs.com/leeolevis/archive/2010/06/08/1754211.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/leeolevis/archive/2010/06/08/1754211.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/leeolevis/archive/2010/06/01/1749358.html</id><title type="text">System.Runtime.Caching;</title><summary type="text">Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--&gt;usingSystem;usingSystem.Collections.Generic;usingSystem.Runtime.Caching;namespaceEnterpriseLibraryCacheTest{publicpartialclassWebForm1:System.Web.UI.Page{protectedvoidPage_Load(objectsender,EventArgs</summary><published>2010-06-01T08:55:00Z</published><updated>2010-06-01T08:55:00Z</updated><author><name>leeolevis</name><uri>http://www.cnblogs.com/leeolevis/</uri></author><link rel="alternate" href="http://www.cnblogs.com/leeolevis/archive/2010/06/01/1749358.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/leeolevis/archive/2010/06/01/1749358.html"/><content type="text">Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--&gt;usingSystem;usingSystem.Collections.Generic;usingSystem.Runtime.Caching;namespaceEnterpriseLibraryCacheTest{publicpartialclassWebForm1:System.Web.UI.Page{protectedvoidPage_Load(objectsender,EventArgs</content></entry><entry><id>http://www.cnblogs.com/leeolevis/archive/2010/05/27/1744992.html</id><title type="text">Asp.Net网站优化系列 数据库的优化措施 索引优化</title><summary type="text">索引的作用就类似于书的目录，书的目录会按照章节的顺序排列，会指想某一张的位置。这样如果在一本数百页的书里面查找某个章节位置的时候，我们就可以只扫描书的目录，扫描的范围缩小了n倍，查询的效率自然就提高了。另外在sql server内存够用的情况下索引会被放到内存中，在内存中查找自然又会提高效率；所以我们必须得合理利用索引。1）对什么列建索引数据库默认情况下会对主键建聚集索引，除了这个索引之外还需要在哪些列上建索引呢？这个问题只能具体情况具体分析，要看需要优化的sql语句（通常是查询次数多，查询相应想要高的语句），根据什么列的条件进行查询。例如：在论坛的数据库中有一张表是帖子回复表，在论坛的应用中</summary><published>2010-05-27T02:13:00Z</published><updated>2010-05-27T02:13:00Z</updated><author><name>leeolevis</name><uri>http://www.cnblogs.com/leeolevis/</uri></author><link rel="alternate" href="http://www.cnblogs.com/leeolevis/archive/2010/05/27/1744992.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/leeolevis/archive/2010/05/27/1744992.html"/><content type="text">索引的作用就类似于书的目录，书的目录会按照章节的顺序排列，会指想某一张的位置。这样如果在一本数百页的书里面查找某个章节位置的时候，我们就可以只扫描书的目录，扫描的范围缩小了n倍，查询的效率自然就提高了。另外在sql server内存够用的情况下索引会被放到内存中，在内存中查找自然又会提高效率；所以我们必须得合理利用索引。1）对什么列建索引数据库默认情况下会对主键建聚集索引，除了这个索引之外还需要在哪些列上建索引呢？这个问题只能具体情况具体分析，要看需要优化的sql语句（通常是查询次数多，查询相应想要高的语句），根据什么列的条件进行查询。例如：在论坛的数据库中有一张表是帖子回复表，在论坛的应用中</content></entry><entry><id>http://www.cnblogs.com/leeolevis/archive/2010/02/02/1662283.html</id><title type="text">学习和分享一点简单的System.Web.HttpRuntime.Cache的使用经验</title><summary type="text">配置文件Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--&gt;&lt;appSettings&gt;&lt;addkey="EnableCache"value="true"/&gt;&lt;addkey="CacheDurationSeconds"value="300"/&gt;&lt;/appSettings&gt;操作方法代码 Code highlighting p</summary><published>2010-02-02T14:57:00Z</published><updated>2010-02-02T14:57:00Z</updated><author><name>leeolevis</name><uri>http://www.cnblogs.com/leeolevis/</uri></author><link rel="alternate" href="http://www.cnblogs.com/leeolevis/archive/2010/02/02/1662283.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/leeolevis/archive/2010/02/02/1662283.html"/><content type="text">配置文件Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--&gt;&lt;appSettings&gt;&lt;addkey="EnableCache"value="true"/&gt;&lt;addkey="CacheDurationSeconds"value="300"/&gt;&lt;/appSettings&gt;操作方法代码 Code highlighting p</content></entry><entry><id>http://www.cnblogs.com/leeolevis/archive/2010/01/23/1654747.html</id><title type="text">Comet:Jquery+asp.net实现http长连接(LongPoll)</title><summary type="text">代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--&gt;&lt;%@PageLanguage="C#"AutoEventWireup="true"CodeFile="JqueryAjaxLongPoll.aspx.cs"Inherits="JqueryAjaxLongPoll"%&gt;&lt;!DOCTYPEhtmlPUBLIC"-//W3C//DTDX</summary><published>2010-01-23T06:54:00Z</published><updated>2010-01-23T06:54:00Z</updated><author><name>leeolevis</name><uri>http://www.cnblogs.com/leeolevis/</uri></author><link rel="alternate" href="http://www.cnblogs.com/leeolevis/archive/2010/01/23/1654747.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/leeolevis/archive/2010/01/23/1654747.html"/><content type="text">代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--&gt;&lt;%@PageLanguage="C#"AutoEventWireup="true"CodeFile="JqueryAjaxLongPoll.aspx.cs"Inherits="JqueryAjaxLongPoll"%&gt;&lt;!DOCTYPEhtmlPUBLIC"-//W3C//DTDX</content></entry></feed>
