What is the lifespan for items stored in ViewState?- Items stored in the ViewState exist for the life of the current page. - This includes postbacks (to the same page). - The viewstate is designed to store the value only for the current page. - It serialize and deserialize whenever the data is stored and retrieved. - The items in ViewState are stored in the hidden control on client side and the value are persisted across the postback. - The view state is maintained only for the current page. - If the data is to be maintained then it has to persist across the pages then use the SessionState, ApplicationState or database.
|