作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2008, Vol. 34 ›› Issue (19): 83-85. doi: 10.3969/j.issn.1000-3428.2008.19.029

• 软件技术与数据库 • 上一篇    下一篇

基于.NET的Ajax控件保值技术及其应用

谭建平,王成良   

  1. (重庆大学软件学院,重庆 400044)
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2008-10-05 发布日期:2008-10-05

Ajax Widget’s Value Keeping Technology Based on .NET and Its Application

TAN Jian-ping, WANG Cheng-liang   

  1. (School of Software, Chongqing University, Chongqing 400044)
  • Received:1900-01-01 Revised:1900-01-01 Online:2008-10-05 Published:2008-10-05

摘要: 在页面内使用Ajax技术与服务器通信可提高Web应用的响应速度,但Web服务器控件引起的页面刷新导致整个页面回传后,页面的视图状态处理模型并没有记录Ajax控件在页面变化之前的值,造成Ajax控件值的丢失。该文提出一种状态保存机制,将Ajax控件状态值存储到服务器的Session或者客户端的userData中,使页面刷新后客户端的Ajax控件仍可保留原有值,保证控件状态的持续。

关键词: Ajax控件, userData行为, 会话, 视图状态, 状态保存机制, .NET技术

Abstract: The process will improve the response speed of Web application by using Ajax technology when Web pages communicate with Web server, however, when the Web pages refreshed by Web server widget, the view state process model of the Web page records Web server widget’s state value does not record the Ajax widget’s value and leads to the loss of the Ajax widget’s value. This paper presents a new state value storage mechanism, which makes Ajax widget’s state value be stored in the Web server session object or the user data object of the client side, so that the Ajax widget of the client side can still hold the same value after the Web page refreshed, which ensures the Ajax widgets state continuance.

Key words: Ajax widget, userData behavior, session, view state, state storage mechanism, .NET technology

中图分类号: