Click here to Skip to main content
12,700,965 members (30,611 online)
Rate this:
Please Sign up or sign in to vote.
See more: .NET
Can anyone please give me any REALTIME example of using viewstate.
Any good example is appreciated.
Posted 15-Dec-12 2:51am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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 :[^]
waj1206 15-Dec-12 8:03am
I need a realtime example .i know how it works.
Can anyone please give me a real time use of this.
@krunal rohit thanks for the answer...i need a real time usage of this view state
Krunal Rohit 15-Dec-12 8:04am
See Example link...
waj1206 15-Dec-12 9:04am
Its not that good...
Can u give me a good example REALTIME

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 15 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100