October 2010
Intermediate to advanced
1920 pages
73h 55m
English
ViewState with the GridView ControlBy default, the GridView control stores the values of all the columns contained in all the rows that it renders in ViewState. In other words, all the rows that the GridView retrieves from its data source are stuffed in a hidden form field.
The advantage of using ViewState is that the GridView does not need to query the database for the same set of records every time a page containing GridView displays. The records are retrieved from the database only when the page first loads.
The disadvantage of using ViewState is that it means that a lot of information might need to be pushed over the wire to a user’s browser. All ViewState information is stored in a hidden form field. When a large number of rows display, ...