<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>phphot - _.net/c#/vb.net/asp.net</title><link>http://blog.csdn.net/phphot/category/355087.aspx</link><description /><dc:language>zh-CN</dc:language><lastUpdateTime>Wed, 23 Jul 2008 23:29:00 GMT</lastUpdateTime><ttl>60</ttl><item><dc:creator>phphot</dc:creator><title>在DLL中调用组件的小例子</title><link>http://blog.csdn.net/phphot/archive/2008/07/23/2700471.aspx</link><pubDate>Wed, 23 Jul 2008 23:12:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/07/23/2700471.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2700471.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/07/23/2700471.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2700471.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2700471</trackback:ping><description>前几天CSDN中的一个朋友询问在DLL中访问窗体中的组件的问题，偶对DLL也不熟，也没有搞懂，昨天他对我说问题解决了,我借其小结一下，让自己印像深刻:
在DLL中访问组件时要类似这样进行判断:
      if panl.Controls[i].ClassNameIS('TEDIT') then
        TEdit(panl.Controls[i]).Clear;
而不能用这样进行判断:
      if panl.Controls[i] is TEDIT then
        TEdit(panl.Controls[i]).Clear;
对于DLL的知识回顾如下：
DLL 在win16与win32中有很大区别，在win16中DLL中是一个全局即只他配一次地址当两个DLL访问同一个变量会有冲突，而在win32中则对于每个实例分配一个独立的地址空间，这类似于COM了，呵，待我回家看看书再好好组织一下语言，现在把DLL创建的过程写一下：
主框架：
library DLL名称;
uses  相关的单元

library Project1;

定义过程&lt;img src ="http://blog.csdn.net/phphot/aggbug/2700471.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>翻译 一些很酷的.Net技巧</title><link>http://blog.csdn.net/phphot/archive/2008/07/23/2700406.aspx</link><pubDate>Wed, 23 Jul 2008 22:59:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/07/23/2700406.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2700406.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/07/23/2700406.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2700406.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2700406</trackback:ping><description>原作出处：http://www.codeproject.com/useritems/tips.asp?df=100

一．.Net Framework

1．  如何获得系统文件夹

使用System.Envioment类的GetFolderPath方法；例如：

Environment.GetFolderPath( Environment.SpecialFolder.Personal )

2．  如何获得正在执行的exe文件的路径

1）  使用Application类的ExecutablePath属性

2）  System.Reflection.Assembly.GetExecutingAssembly().Location

3．  如何检测操作系统的版本

使用Envioment的OSVersion属性，例如：

OperatingSystem os = Environment.OSVersion;

MessageBox.Show(os.Version.ToString());

MessageBox.Show(os.Pla&lt;img src ="http://blog.csdn.net/phphot/aggbug/2700406.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>ASP.NET中常用的26个优化性能方法 </title><link>http://blog.csdn.net/phphot/archive/2008/07/21/2687083.aspx</link><pubDate>Mon, 21 Jul 2008 22:15:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/07/21/2687083.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2687083.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/07/21/2687083.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2687083.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2687083</trackback:ping><description>1. 数据库访问性能优化　
　
数据库的连接和关闭

访问数据库资源需要创建连接、打开连接和关闭连接几个操作。这些过程需要多次与数据库交换信息以通过身份验证，比较耗费服务器资源。ASP.NET中提供了连接池(Connection Pool)改善打开和关闭数据库对性能的影响。系统将用户的数据库连接放在连接池中，需要时取出，关闭时收回连接，等待下一次的连接请求。连接池的大小是有限的，如果在连接池达到最大限度后仍要求创建连接，必然大大影响性能。因此，在建立数据库连接后只有在真正需要操作时才打开连接，使用完毕后马上关闭，从而尽量减少数据库连接打开的时间，避免出现超出连接限制的情况。 　　

使用存储过程 　
　
存储过程是存储在服务器上的一组预编译的SQL语句，类似于DOS系统中的批处理文件。存储过程具有对数据库立即访问的功能，信息处理极为迅速。使用存储过程可以避免对命令的多次编译，在执行一次后其执行规划就驻留在高速缓存中，以后需要时只需直接调用缓存中的二进制代码即可。另外，存储过程在服务器端运行，独立于ASP.NET程序，便于修改，最重要的是它可以减少数据库操作语句在网络中的&lt;img src ="http://blog.csdn.net/phphot/aggbug/2687083.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>微软"云计算"产品 Live Mesh 英文帐户已开放使用</title><link>http://blog.csdn.net/phphot/archive/2008/07/21/2687074.aspx</link><pubDate>Mon, 21 Jul 2008 22:13:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/07/21/2687074.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2687074.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/07/21/2687074.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2687074.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2687074</trackback:ping><description>Live Mesh是微软进入发展迅猛的云计算市场的最新举措。所谓“云计算”是指通过网上的中央数据中心，实现PC上的各种应用与服务。目前，亚马逊、谷歌、 Salesforce等数十家公司已经建立了计算中心，可以高效处理数据外包业务，并使之成为象电一样，企业可以轻松购买的商品。

北京时间2008年7月18日,微软"云计算"产品 Live Mesh 英文帐户已开放使用，注册地为英文的msn.com和live.com等用户已可以登录mesh。

访问:Mesh&lt;img src ="http://blog.csdn.net/phphot/aggbug/2687074.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>GUI的開發瓶頸</title><link>http://blog.csdn.net/phphot/archive/2008/06/28/2593296.aspx</link><pubDate>Sat, 28 Jun 2008 00:25:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/06/28/2593296.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2593296.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/06/28/2593296.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2593296.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2593296</trackback:ping><description>年初和某家IT雜誌社編輯一同參加一場某軟體廠商辦的會議。主講人在台上展示使用他們技術開發出來的漂亮介面，相當吸引人。編輯看了之後，頗為讚許，轉身對我說：這東西很棒吧！我澆了她一盆冷水：要做到這樣的GUI（Graphical User Interface）效果，複雜度相當高，背後投入的資源相當多，可不是一般小公司做得出來的。對於GUI程式設計，我的考量點一直都不是「能不能做得到」，而是「容易做得到嗎」。&lt;img src ="http://blog.csdn.net/phphot/aggbug/2593296.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>学习.net应该知道什么</title><link>http://blog.csdn.net/phphot/archive/2008/06/26/2590047.aspx</link><pubDate>Thu, 26 Jun 2008 20:18:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/06/26/2590047.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2590047.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/06/26/2590047.aspx#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2590047.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2590047</trackback:ping><description>当然我并不想把.NET软件开发概括为一些简单的小问题，我只是想让大家多思考。我相信一个真正优秀的ASP.NET（及WinForm）开发人员应该不仅仅会拖放控件到设计器中，也应该掌握更多的东西。一个优秀的赛车比赛选手很了解他自己的坐驾，他知道哪些可以做？哪些不能做？&lt;img src ="http://blog.csdn.net/phphot/aggbug/2590047.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>.Net的精髓：XML和SOAP</title><link>http://blog.csdn.net/phphot/archive/2008/06/24/2583414.aspx</link><pubDate>Tue, 24 Jun 2008 20:07:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/06/24/2583414.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2583414.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/06/24/2583414.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2583414.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2583414</trackback:ping><description>　　Internet 的应用正在不断地扩大，但我们的 Internet 编程方式还处于石器时代。


　　Internet 用户就像老式主机的分时终端上的用户一样，他们从一个受保护的资源请求信息，然后等待回应。你从正在浏览的 Internet 站点上接收的信息由它希望提供给你的、基于 HTML 的信息组成的。
&lt;img src ="http://blog.csdn.net/phphot/aggbug/2583414.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>什么是底层技术？</title><link>http://blog.csdn.net/phphot/archive/2008/06/19/2567212.aspx</link><pubDate>Thu, 19 Jun 2008 23:29:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/06/19/2567212.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2567212.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/06/19/2567212.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2567212.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2567212</trackback:ping><description>什么是底层技术？

兄弟们，我知道现在很多程序员都是搞Web的，但是这东西现在开始供大于求，况且有迅猛的培训，使得大批的人涌入。因此俺想学点底层的东西，以便有条后路。听说这些东西学着也难一点，也比较适合我们基础好一些的，至少我们是大学生嘛：）


&lt;img src ="http://blog.csdn.net/phphot/aggbug/2567212.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>实现简单的动态代理！</title><link>http://blog.csdn.net/phphot/archive/2008/06/07/2519323.aspx</link><pubDate>Sat, 07 Jun 2008 08:52:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/06/07/2519323.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2519323.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/06/07/2519323.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2519323.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2519323</trackback:ping><description>这两天对java的动态代理感兴趣，自己写了个最简单的代码，认识一下动态代理！

例子：

类列表：

MyObjec是执行类。

MyProxy 是我自己实现的动态代理类，这个类实现了InvocationHandler接口，关于这个借口的描述就不多说了，可以参照api文档！好像动态代理类都实现这个接口，我是这么理解的，呵呵！

Test 类是我的业务类

ITest 是我业务类的接口！
&lt;img src ="http://blog.csdn.net/phphot/aggbug/2519323.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>将 .NET 应用从 Visual Studio 迁移到 Eclipse</title><link>http://blog.csdn.net/phphot/archive/2008/06/06/2518422.aspx</link><pubDate>Fri, 06 Jun 2008 22:55:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/06/06/2518422.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2518422.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/06/06/2518422.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2518422.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2518422</trackback:ping><description>Eclipse 可以轻松地支持 Java™ 和其他编程语言。但是直到最近，仍然很难使用 Eclipse 构建、运行和调试 C# 项目。本文将介绍如何使用 Eclipse Mono Integration (Emonic) 和 NAnt，这些都是可用于 Eclipse 的最活跃的 C# 和 .NET 工具包。本文的目标读者是拥有 .NET 背景知识、熟悉 Eclipse 并且需要使用一种有效方法在 Eclipse 中处理 C# 和 .NET 的开发人员。&lt;img src ="http://blog.csdn.net/phphot/aggbug/2518422.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>总结必须学习的10项.NET技术</title><link>http://blog.csdn.net/phphot/archive/2008/05/29/2493205.aspx</link><pubDate>Thu, 29 May 2008 14:04:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/05/29/2493205.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2493205.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/05/29/2493205.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2493205.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2493205</trackback:ping><description>1、WCF (Windows Communication Foundation):虽然WCF显然没有WPF或SilverLight那么吸引人，但是它却是在.NET框架下解决业务问题的基础。所以你今年至少要学习一门.NET的新技术，那你就选择WCF吧。

　　2、ADO.NET (and LINQ):这是让你与数据层打交道的技术。并且LINQ提供了将各种数据组合起来的方法。如果以上两个技术你都不熟悉的话，那就等着被人来抢你饭碗吧。

　　3、WPF (Windows Presentation Foundation):学习WPF的重要性简直不言而喻。你在程序中所需要的窗体、交互界面、页面都是架构在WPF上的。并且在Vista中已经集成了WPF。

　　4、SQL Server 2005:我明白这其实并不是.NET的内容，但它又确实是.NET的内容。SQL Server 2005为开发者提供了一种在其他平台无法得到的强大力量。你得仔细挖掘这个版本所带来的创新技术，这将帮助你成为一个更好的开发者和问题解决者。

　　5、ASP.NET 2.0:即使是非在线程序开发者也应该了解一&lt;img src ="http://blog.csdn.net/phphot/aggbug/2493205.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>喜欢使用VMware的.NET程序员应该注意的问题</title><link>http://blog.csdn.net/phphot/archive/2008/05/29/2493065.aspx</link><pubDate>Thu, 29 May 2008 13:23:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/05/29/2493065.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2493065.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/05/29/2493065.aspx#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2493065.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2493065</trackback:ping><description>VMware在安装的时候默认会在VS中装插件，VS启动时会去加载这些插件。

VMware一共有四个服务，我们为了启动速度快一点，经常会停掉这些服务。而VS启动加载插件时如果这些服务是停止的，那么加载过程就会停在那里，就像我们看到的一直停留在启动画面的情况。&lt;img src ="http://blog.csdn.net/phphot/aggbug/2493065.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>ASP.NET开发Web服务的五则技巧</title><link>http://blog.csdn.net/phphot/archive/2008/05/26/2483627.aspx</link><pubDate>Mon, 26 May 2008 19:28:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/05/26/2483627.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2483627.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/05/26/2483627.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2483627.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2483627</trackback:ping><description>　　　　除非另外指定，否则，.NET将试图把Web服务绑定到三种协议：HTTP/POST、HTTP/GET和SOAP。之所以说“试图”，是因为依赖于服务的参数和返回类型，HTTP/GET协议可能不可用。.NET生成的WSDL文件将自动包含绑定这三种协议的指令，客户程序可以自由选择使用哪种协议与服务通信。&lt;img src ="http://blog.csdn.net/phphot/aggbug/2483627.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>c#去掉字符串中的回车符</title><link>http://blog.csdn.net/phphot/archive/2008/05/25/2479892.aspx</link><pubDate>Sun, 25 May 2008 14:25:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/05/25/2479892.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2479892.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/05/25/2479892.aspx#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2479892.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2479892</trackback:ping><description>先转换成streamreader类的对象，去掉回车符，再转换回来 

   StreamReader sr = new StreamReader(this.textBox1.Text,System.Text.Encoding.Default);  
    this.textBox2.Text = sr.ReadToEnd().Replace((char)10, ' ').Replace((char)13, ' ');  
    this.textBox2.SelectAll();  
    sr.Close();  &lt;img src ="http://blog.csdn.net/phphot/aggbug/2479892.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>phphot</dc:creator><title>.NET和Web 3.0</title><link>http://blog.csdn.net/phphot/archive/2008/05/14/2444063.aspx</link><pubDate>Wed, 14 May 2008 10:11:00 GMT</pubDate><guid>http://blog.csdn.net/phphot/archive/2008/05/14/2444063.aspx</guid><wfw:comment>http://blog.csdn.net/phphot/comments/2444063.aspx</wfw:comment><comments>http://blog.csdn.net/phphot/archive/2008/05/14/2444063.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.csdn.net/phphot/comments/commentRss/2444063.aspx</wfw:commentRss><trackback:ping>http://tb.blog.csdn.net/TrackBack.aspx?PostId=2444063</trackback:ping><description>《Professional Visual Studio Extensibility》的作者Keyvan Nayyeri 在他的博客里头发表了《.NET and Web 3.0》，作为.NET社区的一个名人，他同时是《Professional Community Server》的共同作者，因为文章讨论的不是目前有些过滥的Web 2.0，而是3.0，我不知道是否应该用3.0来指下一代的Web，或者说Web的未来。
         关于Web 3.0的定义，目前还没有定论，Web之父Tim Berners-Lee 认为下一代的Web应该是语义Web，这也是目前被广泛接受的论点，但还是存在诸多争论，有人认为是Web OS，有人认为是人工智能，也有人认为是一个“可执行”的Web抽象层，也有人认为是API组成的世界，更有甚者，认为Web 3.0是一个商业模式。我们姑且不去讨论具体应该如何定义Web 3.0，但是这些纷争之后我们可以看到一个更加清晰的Web未来所具有的属性——语义、数据、人工智能、网络计算、开放标准、分布式数据库。而具备这些属性越多的商业模式，我们姑且认为越加Web 3.0。
&lt;img src ="http://blog.csdn.net/phphot/aggbug/2444063.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>