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
Solved

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

Posted on 2009-05-06
4
298 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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

860 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