当前位置:首页 » 服务器技术
开发技术指南» 文章正文
    引言: The ASP.NET View Stat
 

 

 ·流mini驱动开发指南(二)    »显示摘要«
    摘要:二、stream class和 minidriver之间的接口 流类接口(stream class interface)主要由介于class driver和minidriver之间的一系列的函数调用组成。class driver对请求的流程(request flow)进行控制,当有必要对适配器硬件进行存取时,它就调用适配器的minidriver。class driver还负责对多处理器和中断同步作出响应。当class driver和minidriver都......
 ·浅析“作坊式”开发    »显示摘要«
    摘要: 发表于软件工程专家网 转载系统分析之窗等 浅析“作坊式”开发 老单 2003-11-20 “作坊式”开发虽然只是对软件开发形式的一种比喻的说法,但深究起来却还真是一个不小的话题。在此我粗浅地探讨一下作坊式开发被广泛采用的一些原因,不谈所谓“作坊式的企业”之类大的话题,只就“开发方式”层面上的相关思路理一理,对工程化管理内容也不再赘述。所述之言为个人观点,观者仁者见仁、智者见智。 这里讲到“作坊式”,主要是指传统手工作坊的生产模式而言的。所谓作坊......


Cutting Edge The ASP.NET View State
  the asp.net view state  

dino esposito 【相关文章:A计划,B计划

【扩展阅读:一次更新Datagrid 中多列数据

【扩展信息:请问那里可以下载xp ddk,网上搜索到

download the code for this article: cuttingedge0302.exe (39kb)

i n asp.net pages, the view state represents the state of the page when it was last processed on the server. it´s used to build a call context and retain values across two successive requests for the same page. by default, the state is persisted on the client using a hidden field added to the page and is restored on the server before the page request is processed. the view state travels back and forth with the page itself, but does not represent or contain any information that´s relevant to client-side page display. in this column, i´ll take a tour of the view state implementation in asp.net and show how to keep your web pages fit and trim and a bit more secure.

view state pros and cons

  view state has pros and cons that you might want to weigh carefully before making a decision to use it. first, view state does not require any server state resources and is simple to implement. view state, though, does require computational effort on the server and the cost of sending the extra data over the wire. since it´s a physical part of the page, it´s fast to retrieve and use; for this same reason, though, it can become a weakness that can be exploited.

  because the view state is packed with the page, it inevitably adds a few extra kilobytes of data to the payload. a complex, real-world page—especially one that does not optimize and restrict the use of the view state—can easily find 10kb of extra stuff packed in the html code sent to the browser. because it´s composed of plain text, the view state could be tampered with. although programmers are not supposed to store sensitive data in the view state (credit card numbers, passwords, or connection strings, for example), it goes without saying that the view state can be used to carry out attacks on the server. view state is not a security hole per se, but just like query strings and other hidden fields you may have used in the past, it´s a potential vehicle for malicious code. since the view state is encoded, protected, and validated, it does provide more security features than other hidden fields that you may use for your own programming purposes.

  view state is one of the most important features of asp.net, not so much because of its technical relevance, but more because it makes the magic of the web forms model possible. however, if used carelessly, view state can easily become a burden.

the statebag class

  statebag implements the view state and manages the information that asp.net pages and embedded controls persist across successive posts of the same page instance. the class works like a dictionary object and implements the istatemanager interface. the page and the control base classes expose the view state through the viewstate property. so you can add or remove items from statebag as you would with any dictionary object: viewstate["fontsize"] = value;


...   下一页
 ·i/o completion ports    »显示摘要«
    摘要:最近想看看有关完成端口的东东,于是就从这里开始了。我试图完美的将其翻译出来,可耐水平有限,有几句我不太有把握。大家帮忙一下? platform sdk: storage i/o completion ports i/o completion ports are the mechanism by which an application uses a pool of threads that was created when the ap......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE