NET
ASP.NET 中在指定的位置处插入字符
摘要: ASP.NET 中在指定的位置处插入字符.这是论坛中的一个问题,很多人经常会遇到,就贴出来。
阅读全文
posted @
2008-06-05 11:31 陋室 阅读(251) |
评论 (0) 编辑
提示按下大写键的控件:MQTool(提供下载)
摘要:
我们在做用户登陆的时,很多时候我们的密码是区分大小写的,这就存在一个问题.如果你的Caps Lock键是亮着的,尽管你输入的密码是对的,也无法登陆.所以我们有必要在Caps Lock被按下的时候,提示用户.这就是这篇文章所要讲的.
你阅读过本文,你可以有一下几点收获
1:拥有一个免费的插件(可以提示Caps Lock)
2:你会对MicroSoft的验证控件有全新的认识(MicroSoft的验证控件的原理就是这样,当然比这复杂)
3:你将了解到在Assembly嵌入外部resource
3:你将了解到在Assembly嵌入外部resource
阅读全文
posted @
2008-06-04 10:47 陋室 阅读(2071) |
评论 (24) 编辑
如何在mail的正文显示图片
摘要:
最近看到很多人在问这个问题.就是如何在Mail的正文中如何显示附件的图片?本人也不会就去网上搜索.可是网上竟然没有(可能是太简单,很多人不屑提供代码),于是本人就尝试.
最先想到的就是outLook可以显示附件中的图片.于是在OutLook的邮件正文:右键->ViewSource 就看到了源代码" < img width=560 height=420 id="_x0000_i1025"
src="cid:image001.jpg@01C8C4AF.C7E6ED20">"
这种代码 所以产生的第一个想法就是在写正文的时候,自动根据附件去生成类似代码.说干就干,马上动手!
阅读全文
posted @
2008-06-02 14:22 陋室 阅读(2834) |
评论 (19) 编辑
Building a File Service
摘要: Problem:
Managing files web applications should be quick and easy and most importantly, consistent. The traditional way to store files is on the file system or within a RDBMS (SQL SERVER, Oracle, MySql) or on SharePoint. However what if you were developing several applications that shared a million files and each was 5MB. Which solution would you choose? This is commonly the case for large content driven sites (Music Stores, video sharing sites, content management systems, etc).
Solutio
阅读全文
posted @
2008-05-11 22:35 陋室 阅读(120) |
评论 (1) 编辑
ASP.NET程序的优化建议<转>
摘要: 一、数据库操作
1、用完马上关闭数据库连接
访问数据库资源需要创建连接、打开连接和关闭连接几个操作。这些过程需要多次与数据库交换信息以通过身份验证,比较耗费服务器资
源。ASP.NET中提供了连接池(Connection Pool)改善打开和关闭数据库对性能的影响。系统将用户的数据库连接放在连接池中,需要时取出,关闭时收回连接,等待下一次的连接请求。
连接池的大小是有限的,如果在连接池达到最大限度后仍要求创建连接,必然大大影响性能。因此,在建立数据库连接后只有在真正需要操作时才打开连接,使用完毕后马上关闭,从而尽量减少数据库连接打开的时间,避免出现超出连接限制的情况。
用(推荐)
using(SqlConnection Conn=new SqlConnection(connstr))
{}//不必显示关闭
或
try{conn.Open();}
catch{}
finally{conn.Close();}
阅读全文
posted @
2008-04-20 21:17 陋室 阅读(220) |
评论 (0) 编辑
ASP.NET部署与安装_MSI制作图文教程.
摘要: 在发布创建自己的应用池的文章后,很好博友,希望能看到图文的教程,现在帖出来,大家共勉!
MSI 制作图文教程,如果需要源程序.可以留下Mail,我会发送到邮箱!
谢谢
阅读全文
posted @
2008-04-11 09:10 陋室 阅读(3101) |
评论 (58) 编辑
在打包的时候,创建应用程序池,并自动将程序assign到新创建的池中(MSI制作)
摘要: MSI制作
在打包的时候,创建应用程序池,并自动将程序assign到新创建的池中(MSI制作)
阅读全文
posted @
2008-04-10 12:24 陋室 阅读(2201) |
评论 (13) 编辑
Post-Cache Substitution
摘要: 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.
阅读全文
GridView中,数据格式的设置种类
摘要: 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}
阅读全文
Other Types of Expressions
摘要: Other Types of Expressions
Data binding expressions are always wrapped in the <%# and %> 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
阅读全文
3.30在ASP.NET中使用Transaction的几点注意
摘要: 或许,在asp.net程序钟我们经常使用Transaction,但是我们很少去考虑它对我们程序Performance的影响.所以引起了很多问题,下面几点是我们应该在使用事务的时候应该注意的.
阅读全文
posted @
2008-03-30 15:45 陋室 阅读(115) |
评论 (0) 编辑
Configuring Session State
摘要: 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:
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424" stateNetworkTimeout="10"
sqlConnectionString="data source=127.0.0.1;Integrated Securi 阅读全文
Server.Transfer : Passing values from one page to another page
摘要: 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
阅读全文
ASP.NET State Management
摘要: 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
阅读全文
ASP.NET 应用程序生命周期概述_摘自MSDN
摘要: ASP.NET
ASP.NET 应用程序生命周期概述
本主题概述应用程序生命周期,列出重要的生命周期事件,并描述如何编写适合应用程序生命周期的代码。在 ASP.NET 中,若要对 ASP.NET 应用程序进行初始化并使它处理请求,必须执行一些处理步骤。此外,ASP.NET 只是对浏览器发出的请求进行处理的 Web 服务器结构的一部分。了解应用程序生命周期非常重要,这样才能在适当的生命周期阶段编写代码,达到预期的效果。
应用程序生命周期概述
下表描述了 ASP.NET 应用程序生命周期的各个阶段。
阅读全文
Full NET Archive