Click here to Skip to main content
11,631,992 members (73,113 online)
Rate this: bad
good
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 1:51am
waj1206712

1 solution

Rate this: bad
good
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 : http://asp-net-example.blogspot.in/2009/01/aspnet-viewstate-example-how-to-read.html[^]
  Permalink  
Comments
waj1206 at 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 at 15-Dec-12 8:04am
   
See Example link...
waj1206 at 15-Dec-12 9:04am
   
@rohit
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
0 OriginalGriff 8,393
1 Sergey Alexandrovich Kryukov 8,044
2 Mika Wendelius 6,260
3 F-ES Sitecore 2,321
4 Suvendu Shekhar Giri 1,970


Advertise | Privacy | Mobile
Web01 | 2.8.150728.1 | Last Updated 15 Dec 2012
Copyright © CodeProject, 1999-2015
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