How to manage page data without using viewstate in asp.net page

Hi experts,

I have problem with viewstates in asp.net pages.My client is having week internet connection.Due to huge viewstate the page is taking too much time for loading from server. I have grid control on my pages which are actually creating huge viewstate for page.

Can i remove all the viewstate from the page and move it to session to store the data of controls in it. My control on pages are also having event associated with them speciall the grid control having "row bound event"

I am not aware of how it can be done and handled.

Can any one please provide me a solution to it?

Its very urgent.
LVL 1
winjittechnologiesAsked:
Who is Participating?
 
GuitarRichConnect With a Mentor Commented:
Have a look at this - you can store the viewstate in the session which will reduce the size of the pages:
http://www.hanselman.com/blog/MovingViewStateToTheSessionObjectAndMoreWrongheadedness.aspx
 
0
 
copyPasteGhostCommented:
Is the view state absolutly necessary for the whole page? you can just disable the viewstate on some controls that will make your page smaller.

Ghost
0
 
copyPasteGhostConnect With a Mentor Commented:
you can also Cache the data on the server using the Cache object.

or if you only need the data for one request you can use the

HttpContext.Current.Items["StoreStuff"] = "";
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.