Solved

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

Posted on 2009-05-06
4
291 Views
Last Modified: 2013-12-17
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.
0
Comment
Question by:winjittechnologies
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
GuitarRich earned 250 total points
ID: 24313578
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
 
LVL 13

Expert Comment

by:copyPasteGhost
ID: 24314462
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
 
LVL 13

Assisted Solution

by:copyPasteGhost
copyPasteGhost earned 250 total points
ID: 24314485
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

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question