ahmedhamama
New Member
I have a page that includes a datagrid, some textboxes, etc. I pull in data for the datagrid from a database and put it in a dataset. I create dataviews when I sort the datagrid.<BR><BR>I've created one version of the page that stores the dataset in ViewState (as an xml string) to persist it during trips to the server. The viewstate hidden field is huge !<BR><BR>I've also create another version of the page that stores the dataset as a Cache object.<BR><BR>I've also created a version that stores the dataset as a session object.<BR><BR>All versions work fine, but it seems like dragging the dataset back and forth to the server in viewstate is a waste of resources. Using the Cache to store objects seems to have gotten mixed reviews on this forum. Storing things in session seems to be a general "not best practice" due to web farm issues.<BR><BR>My question is this, are there general practices for using cache over viewstate over session ?<BR><BR>I guess the only approach I haven't tried is storing the dataset in a database and getting it during postback.<BR><BR>Any input would be appreciated.<BR><BR>Tomtt