Viewstate is used 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 button, 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.
Bageshkumarbagi, if this helps please login to Mark As Answer. |
Reply | Alert Moderator