Alternative for Viewstate to store Dataset? + State management

Hi,

        In my application, we are handling dataset/datatable to enable the gridview paging/sorting functionality. hence the dataset/datatabel object are stored in Viewstate to avoid the DB call on every page click or sorting. Now the problem is viewstate size, because in my application we may have more than one gridview so that the datset size also increased and viewstate size also increased to 1 MB.

               1. How to reduce the viewstate size? or What is gobal norms for Viewstate size i.e. recommanded maximum size for better performnace?

               2. I can move that state management to Session also, but will that a right decision? Will it create problem?

               3. Or can we make DB call on every click in Gridview? (We use Oracle 10g)

               Which is the best option recommanded?  Any other best approach is available for performance apart from these three option?

               Please help me?

Thanks,

Anbu 

 

0
anbuzone
11/17/2008 5:53:08 PM
asp.net.state-management 8807 articles. 0 followers. Follow

1 Replies
1475 Views

Similar Articles

[PageSpeed] 22
Get it on Google Play
Get it on Apple App Store

Hi,

1 mb is to big for viewstate.

if the query takes a long time to fetch the data, use session-state.
if it is a small query you can call it every time.

another approach is the cache-functionality, if the data is the same for all users of your application.


-------------------------------------------------
J├╝rgen
0
siedler
11/17/2008 6:58:48 PM
Reply: