Welcome Guest Log in
EnglishRussian

I have two DataGrid controls on the page. The ViewState size is about 5 Kb. How much will this size decrease if I use the ViewStatePage class?
 

About 5 Kb. When you use the ViewStatePage class, the ViewState size is about 40 bytes no matter how many controls are now in use.

 
I have a very simple page and the ViewState size is about 200 bytes. Do I need the ViewStatePage class?
 

No. The use of ViewStatePage makes no sense here and even can decrease productivity.

 
I have a large ViewState field width but there�s no database on the site. I receive about 100 visitors a day. Should I create a database to work with the ViewStatePage class only?
 

Starting with 1.1 version, the ViewStatePage class can save the ViewState field value as file (see the Mode property). In your case, you had better take advantage of the feature.

 
I use the DataGrid control. I had a large ViewState field width before but I have just set the EnableViewState property value of the page to False and I fill it with data each time I make a new request.
 

How much does it take to process the query? When you use the ViewStatePage class during a page being processed you perform two additional queries, which last few milliseconds. Don�t you think you can lose on productivity if you form the page again and again?

 
I have given up using the DataGrid and DataList controls and design pages in HomeSite I don�t use ViewState at all and can�t figure out what it is for because I�ve been going without it for five (eight, ten, etc.) years.
 

You seem to be professional designer of the old school. If you can afford to spend most of your time on solving the problems that were already solved a long time ago... Good for you! As far as we know, most modern developers use compound server control elements, which accelerates (and cheapens) development. We�re not going to protect one or the other of the two methods. We just help you get rid of overheads you may have when you place controls, which actively use the ViewState field.

 
To fill in the page I make a complex database query but then I save the results in a session (cache) and use them in page generation when the EnableViewState property is disabled.
 

This decision is acceptable, even recommended. If you have an up-to-date server with sufficient main memory size, you won�t probably need any other tricks. All you have to do is understand that the session is not a door to the other world of infinite possibilities. It�s memory of your server that has a finite size. So we recommend that you test your server using stress tools. The above-mentioned decision is likely to use all available memory, so it may affect productivity.

 
I use page content compression facilities and easily benefit from this in 70%, so the page size is not important to me.
 

Probably. But compressing 10 Kb is one thing, compressing 20 Kb is another. This takes additional processor time. We would recommend that you try our trial version and then compare the server productivity when you use the ViewStatePage class and when you don�t.

Copyright © 2005-2007 SoftAIN