473,385 Members | 2,044 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Optimizing ViewState

Does anyone know any tricks for reducing the size of the ViewState?

Kind regards

Ben

Nov 19 '05 #1
4 3049
Ben,
The question is on the vague side. Turn on tracing, see what's using
viewstate and see if you can make it work without. if your page doesn't
postback, you can turn viewstate off at the page level.

Check out Scott Guthrie's deck on performance
http://scottgu.com/PerformanceEurope.zip it touches briefly on viewstate.

A nice compression module can help mitigate the performance issues around
round-triping large viewstate
(http://www.blowery.org/code/HttpCompressionModule.html)

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Ben Fidge" <be*******@btopenworld.com> wrote in message
news:eD**************@tk2msftngp13.phx.gbl...
Does anyone know any tricks for reducing the size of the ViewState?

Kind regards

Ben

Nov 19 '05 #2
Thanks Karl,

I'll have a look.

Ben
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:uw*************@TK2MSFTNGP15.phx.gbl...
Ben,
The question is on the vague side. Turn on tracing, see what's using
viewstate and see if you can make it work without. if your page doesn't
postback, you can turn viewstate off at the page level.

Check out Scott Guthrie's deck on performance
http://scottgu.com/PerformanceEurope.zip it touches briefly on viewstate.

A nice compression module can help mitigate the performance issues around
round-triping large viewstate
(http://www.blowery.org/code/HttpCompressionModule.html)

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Ben Fidge" <be*******@btopenworld.com> wrote in message
news:eD**************@tk2msftngp13.phx.gbl...
Does anyone know any tricks for reducing the size of the ViewState?

Kind regards

Ben


Nov 19 '05 #3
Things that will considerably reduce your viewstate size :-

1) Disable viewstate for those controls that are going to get populated
everytime a page loads.
2) Disable viewstate for the page if the page does not postback to itself.
3) Viewstate can store a type that either is serializable or has a
TypeConverter defined for it can be persisted in ViewState. However, types
that are only serializable are slower and generate a much LARGER ViewState.
Hence reduce the number of only serializable types.
Best of Luck

"Ben Fidge" wrote:
Does anyone know any tricks for reducing the size of the ViewState?

Kind regards

Ben

Nov 19 '05 #4
hey one more site to help you with compressing the viewstate.

http://www.mostlylucid.co.uk/archive...01/03/694.aspx
"Shaun" wrote:
Things that will considerably reduce your viewstate size :-

1) Disable viewstate for those controls that are going to get populated
everytime a page loads.
2) Disable viewstate for the page if the page does not postback to itself.
3) Viewstate can store a type that either is serializable or has a
TypeConverter defined for it can be persisted in ViewState. However, types
that are only serializable are slower and generate a much LARGER ViewState.
Hence reduce the number of only serializable types.
Best of Luck

"Ben Fidge" wrote:
Does anyone know any tricks for reducing the size of the ViewState?

Kind regards

Ben

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Mel | last post by:
I have a large collection of custom objects, each representing a period in time with each having a start datetime and an end datetime. I frequently need to query this collection to return a subset...
2
by: Brian | last post by:
In particular, this question goes out to the Microsoft C++ development team. Back in June, Ronald Laeremans posted the following message. Has the optimizing compiler been included with the...
9
by: John Kirksey | last post by:
I have a page that uses an in-place editable DataGrid that supports sorting and paging. EnableViewState is turned ON. At the top of the page are several search fields that allow the user to filter...
1
by: Alejandro Penate-Diaz | last post by:
another question on optimization. could I just post back the selected value of a dropdownlist? I have like three dropdownlists with lots of data, in the same web form, problem is that is slowing...
6
by: hitendra15 | last post by:
Hi I have created web user control which has Repeater control and Linkbutton in ItemTemplate of repeater control, following is the code for this control On first load it runs fine but when...
5
by: Dariusz Tomon | last post by:
Hi I noticed that all my ASPNET applications (+ MSSQL Server - I checked the database and it is ok) run very slowly (especially from the beginning). I made comparison to other applications (not...
12
by: Nick C | last post by:
Hi How can i reduce the viewstate for my asp.net application. It is getting very large now. What is a good solution? thanks N
2
by: Danny | last post by:
Hi All, Yesterday I ran my ASP.NET application as a client and it had serious performance issues (clicking a button and waiting 2 minutes to get a response, images downloaded very slowly, etc.),...
0
by: clintonG | last post by:
The initial loading of the page is very pokey. I've scrutinized disabling ViewState on controls where possible. What caching or other strategy might I consider when most of the TextBoxes, Radio and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.