Solved

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

Posted on 2009-05-06
4
308 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

710 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