473,507 Members | 12,693 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ViewState Size Reduced, but not Completely Empty

I'm trying to optimize performance of a few pages. Toward this result, I
have done the following:
1. set EnableViewState="false" and EnableSessionState="false" in the @ Page
directive.
2. set EnableViewState="false" in the @ Control directive of two user
controls that appear on the page
3. set EnableViewState="false" for each of 16 imageButtons that are declared
on the page.

Just wondering why I still see a long string stored in __VIEWSTATE when I
view the source of the page from IE (View | Source). Completing the steps
listed above significantly reduced the size of the __VIEWSTATE content, but
it still contains more than 800 bytes). What could still be storing
information in ViewState?

Thanks in advance.
Nov 18 '05 #1
1 1142
If you dont need to post back you can remove the runat="server" from
the form tag - this should eliminate viewstate completely.

Even when you disable viewstate at the page level there is still a
little left behind by the page - but 800 bytes seems a bit excessive.

--
Scott
http://www.OdeToCode.com

On Mon, 19 Jan 2004 14:26:08 -0800, "Jeff S" <Ya*****@OkeyDokey.com>
wrote:
I'm trying to optimize performance of a few pages. Toward this result, I
have done the following:
1. set EnableViewState="false" and EnableSessionState="false" in the @ Page
directive.
2. set EnableViewState="false" in the @ Control directive of two user
controls that appear on the page
3. set EnableViewState="false" for each of 16 imageButtons that are declared
on the page.

Just wondering why I still see a long string stored in __VIEWSTATE when I
view the source of the page from IE (View | Source). Completing the steps
listed above significantly reduced the size of the __VIEWSTATE content, but
it still contains more than 800 bytes). What could still be storing
information in ViewState?

Thanks in advance.


Nov 18 '05 #2

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

Similar topics

8
4264
by: Invalidlastname | last post by:
Hi, We are developing an asp.net application, and we dynamically created certain literal controls to represent some read-only text for certain editable controls. However, recently we found an issue...
2
1541
by: Alejandro Penate-Diaz | last post by:
Hi. I am trying to reduce a DataGrid viewstate info by doing what this article says: http://authors.aspalliance.com/JimRoss/Articles/DatagridDietPartTwo.aspx .. I need to disable viewstate for all...
1
2306
by: Jonathan | last post by:
Hello, I'm writed a WebCustomControl but I can't mantain the viewstate this is the code of my WebCustomContol: public class WebCustomControl1 : System.Web.UI.WebControls.WebControl,...
10
3060
by: Robert | last post by:
I have an app that was originally 1.1, now migrated to 2.0 and have run into some sporadic viewstate errors...usually saying the viewstate is invalid, eventvalidation failed or mac error. My web...
1
1394
by: John | last post by:
I'm having problems controlling viewstate size in ASP.NET 2.0. I have a repeater, which contains a gridview, which contains another gridview. All this is databound to produce a 100page report...
10
1611
by: Lloyd Dupont | last post by:
When you define UserControl in source code the sample I see are often like that: ============ public string Text { get { String s = (String)ViewState; return ((s == null) ? String.Empty : s);...
1
1949
by: Mark Olbert | last post by:
I have a "master" composite control which, in turn, holds an instance of a "detail" composite control (the "master" control will ultimately contain multiple instances of the "detail" control, but...
6
2072
by: AAOMTim | last post by:
I have a large ViewState and I've heard I can save the ViewState in a sesison object. What are the advantages of doing so and how do I do it? I've been told that I am gettign DNS timeouts because...
40
2407
by: jayapal | last post by:
Hi all, We have large code on which we are solving the bugs. For every bug we change the code part either add or delete some of the code part. More is adding the code part and very less is...
0
7223
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
7110
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7372
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...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5041
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1540
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.