ASP中使用Session变量的优缺点
ASP中使用Session变量的优缺点
许多人利用Session变量来开发ASP(Active Server Pages)。这些变量与任何编程语言中通用的变量非常相似,并且具有和通用变量一样的优点和缺陷。任何命令都需要运行时间和存储空间(甚至GOTO’s语句如此),Session变量同样需要自己的运行时间和存储空间。过多地使用Session变量就会导致无法代码冗余,并且使服务器运行成本提高下面是我个人使用Session变量的一些主要观点和心得体会。
优点:
如果要在诸多Web页间传递一个变量,那么用Session变量要比通过QueryString传递变量可使问题简化。
Use the pluses and minuses of Session variable in ASP
A lot of people make use of Session variable to develop ASP (Active Server Pages). Variable these and any programming language the variables in common use are very similar, And have merit and defect as variable in common use .Any order needs running time and memory space (even GOTO's sentence is so), Session variable need one's own running time and memory space too. Use Session variable to cause the unable code to be redundant too much, Make server operate cost use Session some main view and gains in depth of comprehension of variable I under raising. [资料来源:www.doc163.com]
3700字 [资料来源:www.doc163.com]