摘要: 托管代码 (managed code) :由公共语言运行库环境(而不是直接由操作系统)执行的代码。托管代码应用程序可以获得公共语言运行库服务,例如自动垃圾回收、运行库类型检查和安全支持等。这些服务帮助提供独立于平台和语言的、统一的托管代码应用程序行为。 Unmanaged Code - 非托管代码 :在公共语言运行库环境的外部,由操作系统直接执行的代码。非托管代码必须提供自己的垃圾回收、类型检查、安全支持等服务;它与托管代码不同,后者从公共语言运行库中获得这些服务。 阅读全文
posted @ 2008-05-04 10:08 陋室 阅读(3251) 评论(1) 推荐(0) 编辑
摘要: 数据库设计中的五个范式 第一范式: 对于表中的每一行,必须且仅仅有唯一的行值.在一行中的每一列仅有唯一的值并且具有原子性. 第一范式是通过把重复的组放到每个独立的表中,把这些表通过一对多关联联系起来这种方式来消除重复组的。 第二范式: 第二范式要求非主键列是主键的子集,非主键列活动必须完全依赖整个主键。主键必须有唯一性的元素,一个主键可以由一个或更多的组成唯一值的列组成。一旦创建,主键无法改变,外键关联一个表的主键。主外键关联意味着一对多的关系. 第二范式处理冗余数据的删除问题。当某张表中的信息依赖于该表中其它的不是主键部分的列的时候,通常会违反第二范式。 阅读全文
posted @ 2008-04-27 20:17 陋室 阅读(435) 评论(1) 推荐(0) 编辑
摘要: 由于我们很多的数据是xml格式的,特别是web service得到的数据,我们能不能直接把xml作为数据源进行绑定呢? 答案是:yes! 本章演示一个 XML 应用程序的小型框架。 注释:本例使用了数据岛(Data Island),只能运行于 Internet Explorer 浏览器。 XML 文档实例 请看下面这个 XML 文档 ( "cd_catalog.xml" ),它描述了一个 阅读全文
posted @ 2008-04-24 19:34 陋室 阅读(1274) 评论(1) 推荐(0) 编辑
摘要: 一、数据库操作 1、用完马上关闭数据库连接 访问数据库资源需要创建连接、打开连接和关闭连接几个操作。这些过程需要多次与数据库交换信息以通过身份验证,比较耗费服务器资 源。ASP.NET中提供了连接池(Connection Pool)改善打开和关闭数据库对性能的影响。系统将用户的数据库连接放在连接池中,需要时取出,关闭时收回连接,等待下一次的连接请求。 连接池的大小是有限的,如果在连接池达到最大限度后仍要求创建连接,必然大大影响性能。因此,在建立数据库连接后只有在真正需要操作时才打开连接,使用完毕后马上关闭,从而尽量减少数据库连接打开的时间,避免出现超出连接限制的情况。 用(推荐) using(SqlConnection Conn=new SqlConnection(connstr)) {}//不必显示关闭 或 try{conn.Open();} catch{} finally{conn.Close();} b 阅读全文
posted @ 2008-04-20 21:17 陋室 阅读(473) 评论(0) 推荐(0) 编辑
摘要: 在发布创建自己的应用池的文章后,很好博友,希望能看到图文的教程,现在帖出来,大家共勉! MSI 制作图文教程,如果需要源程序.可以留下Mail,我会发送到邮箱! 谢谢 阅读全文
posted @ 2008-04-11 09:10 陋室 阅读(4794) 评论(61) 推荐(1) 编辑
摘要: MSI制作在打包的时候,创建应用程序池,并自动将程序assign到新创建的池中(MSI制作) 阅读全文
posted @ 2008-04-10 12:24 陋室 阅读(2652) 评论(12) 推荐(0) 编辑
摘要: Cache Notifications in SQL Server 2000 or SQL Server 7 ASP.NET uses a polling model for SQL Server 2000 and SQL Server 7. Older versions of SQL Server and other databases aren’t supported (although third parties can implement their own solutions by creating a custom dependency class). With the polling model, ASP.NET keeps a connection open to the database and uses a dedicated thread to check periodically if a table has been updated. The effect of tying up one connection i 阅读全文
posted @ 2008-04-08 22:58 陋室 阅读(461) 评论(0) 推荐(0) 编辑
摘要: Post-Cache Substitution The post-cache substitution feature (which is new in ASP.NET 2.0) revolves around a single method that has been added to the HttpResponse class. The method is WriteSubstitution(), and it accepts a single parameter—a delegate that points to a callback method that you implement in your page class. This callback method returns the content for that portion of the page. 阅读全文
posted @ 2008-04-06 22:55 陋室 阅读(433) 评论(0) 推荐(0) 编辑
摘要: Formatting Fields Each BoundField column provides a DataFormatString property that you can use to configure the appearance of numbers and dates using a format string. Format strings are generally made up of a placeholder and format indicator, which are wrapped inside curly brackets. A typical format string looks something like this: {0:C} 阅读全文
posted @ 2008-04-05 18:16 陋室 阅读(478) 评论(0) 推荐(0) 编辑
摘要: Other Types of Expressions Data binding expressions are always wrapped in the characters. ASP.NET 2.0 also adds support for different types of expressions, commonly known as $ expressions because they incorporate the $ character. Technically, a $ expression is a code sequence that you can add to an .aspx page and that will be evaluated by an expression builder when the page is rendered. The expression builder processes the expression and replaces it with a string v 阅读全文
posted @ 2008-04-04 00:03 陋室 阅读(326) 评论(0) 推荐(0) 编辑
摘要: 或许,在asp.net程序钟我们经常使用Transaction,但是我们很少去考虑它对我们程序Performance的影响.所以引起了很多问题,下面几点是我们应该在使用事务的时候应该注意的. 阅读全文
posted @ 2008-03-30 15:45 陋室 阅读(802) 评论(0) 推荐(0) 编辑
摘要: Configuring Session State You can configure session state through the element in the web.config file for your application. Here’s a snapshot of all the available settings you can use: sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" stateNetworkTimeout="10" sqlConnectionString="data source=127.0.0.1;Integrated Securi 阅读全文
posted @ 2008-03-27 22:38 陋室 阅读(498) 评论(0) 推荐(0) 编辑
摘要: Some times, we want to pass values from one page to another page. There are many ways by which we can do this like: by using query string, or session variable, or Server.Transer etc. Web Forms pages are classes in your application, and as such, you can create properties for them as you would any class. However, Web Forms pages have a very short lifetime, since they effectively exist only long enough to perform page processing. Properties on a Web Forms page therefore have limited use, s 阅读全文
posted @ 2008-03-27 09:36 陋室 阅读(279) 评论(0) 推荐(0) 编辑
摘要: ASP.NET State Management ASP.NET includes a variety of options for state management. It features the same Session and Application state collections as traditional ASP (with a few enhancements) and an entirely new view state model. ASP.NET even includes a caching system that allows you to retain information without sacrificing server scalability. Each state management choice has a different lifetime, scope, performance overhead, and level of support. 下表是Collection-based st 阅读全文
posted @ 2008-03-25 22:50 陋室 阅读(399) 评论(0) 推荐(0) 编辑
摘要: ASP.NET ASP.NET 应用程序生命周期概述 本主题概述应用程序生命周期,列出重要的生命周期事件,并描述如何编写适合应用程序生命周期的代码。在 ASP.NET 中,若要对 ASP.NET 应用程序进行初始化并使它处理请求,必须执行一些处理步骤。此外,ASP.NET 只是对浏览器发出的请求进行处理的 Web 服务器结构的一部分。了解应用程序生命周期非常重要,这样才能在适当的生命周期阶段编写代码,达到预期的效果。 应用程序生命周期概述 下表描述了 ASP.NET 应用程序生命周期的各个阶段。 阅读全文
posted @ 2008-03-25 10:18 陋室 阅读(335) 评论(0) 推荐(0) 编辑