Viewstate实时示例 [英] Viewstate realtime example

查看:68
本文介绍了Viewstate实时示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以给我任何使用viewstate的REALTIME示例。

感谢任何好的例子。

Can anyone please give me any REALTIME example of using viewstate.
Any good example is appreciated.

推荐答案

首先从这开始...

查看状态:

使用viewstate存储同一页面访问的数据。理想情况下是POSTBACK情况。

例如,想一个报告。当用户选择条件时,附加过滤条件,最后当用户点击提交时,生成报告。在这里,我们可以使用viewstate来保存过滤条件,因为回发了相同的页面。当我们在这里使用session时,过滤条件在会话到期时丢失。



一般来说,对于冗长的报告,禁用viewstate for datastids是一个很好的做法。



初学者查看状态指南 [ ^ ]



示例: http://asp-net-example.blogspot.in/2009/01/aspnet-viewstate- example-how-to-read.html [ ^ ]
First start with this...
View State:
Use viewstate to store data that are accessed by the same page. Ideally a POSTBACK situation.
For example, think of a report. The filter condition is appended as and when the user selects a condition and finally when the user click submit the report is generated. Here we can use viewstate to save the filter condition since the same page is posted back. When we use session here, the filter condition is lost on session expiry.

In general, its a good practice to disable viewstate for datagrids for lengthy reports.

and Beginner''s Guide To View State [^]

Example : http://asp-net-example.blogspot.in/2009/01/aspnet-viewstate-example-how-to-read.html[^]


这篇关于Viewstate实时示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆