100
Continue101
Switching protocols
以前的时候,自己读了一篇关于HttpContext的文章,直到今天我才知道自己以前原来都被它误导了,使我误解为HttpContext是存在整个用户请求的生命周期,而实则上只存在单个的请求中引用一篇文章如下,希望对大家有所帮助
1, var str=“ abbbbacc”;
var rs=str.replace(“a”,”0”);   
(A)0bbbbacc (B)0bbbb0cc
2,var str=“ abbbbacc”;
var rs=str.replace(“/a/”,”0”);   
(A)0bbbbacc (B)0bbbb0cc
3,var str=“ abbbbacc”;
var rs=str.replace(“/a/g”,”0”);   
(A)0bbbbacc (B)0bbbb0cc
附注:String对象的replace方法签名为:
replace(regx,str)一,概述
解决办法:Your generated aspx files are all using the same CodeFile, yes? From what I'm understanding you can not have multiple aspx files using the same codefile! It seems weird, but this error seems to start occurring when more and more aspx files are using the same codefile.
1)避免使用ArrayList。
     因为任何对象添加到ArrayList都要封箱为System.Object类型,从ArrayList取出数据时,要拆箱回实际的类型。建议使用自定义的集合类型代替ArrayList。.net 2.0提供了一个新的类型,叫泛型,这是一个强类型,使用泛型集合就可以避免了封箱和拆箱的发生,提高了性能。2)使用HashTale代替其他字典集合类型(如StringDictionary,NameValueCollection,HybridCollection),存放少量数据的时候可以使用HashTable.
今天看msdn上说的,如果只读取xml数据,XPathDocument的性能比XmlDocument的要好些,同时用编译了的xpath速度更快,为了测试,今天做了个对比试验,从xml文档循环5000次读取节点的innertext测试结果如下:分别记录五个 单位均为秒
转自博客园dudu ASP.NET 2.0运行时简要分析
It's often convenient to divide long documents into multiple files. The classic example is a book, which is customarily divided in chapters. Each chapter may be further subdivided into sections. Traditionally one has used XML external entity references to support document division. For example, this book has three chapters, each stored in a separate file:However, external entity references have a number of limitations. Among them:

Subscription

Statistics

Locations of visitors to this page