473,473 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Viewstate enabled and set, but not all data is being stored in thepage

I have a custom web control, similar to a datagrid. The grid can have a
button that the user clicks to select the row. I use a custom button
with a data field that is stored in the Viewstate. So far, this is
working fine.

If I add another button to the row in exactly the same manner, the
Viewstate for that button is not saved. I turned on the Trace for the
page and it shows first button containing 56 bytes of Viewstate, but the
second button shows zero.

I debugged through the creation of the grid. All components have
EnabledViewState = true. I checked the Viewstate bag before the page is
posted and all buttons contained the "ButtonData" object. It appears
that when the page is rendered, the viewstate object is not picking up
the second button.

Is there some tool that can be used to pull the Viewstate string apart?

Thanks,
Keith
Nov 19 '05 #1
1 1071
Keith Murray <ke*@leoninedev.com> wrote in
news:zK********************@tornado.tampabay.rr.co m:
I have a custom web control, similar to a datagrid. The grid can
have a button that the user clicks to select the row. I use a
custom button with a data field that is stored in the Viewstate.
So far, this is working fine.

If I add another button to the row in exactly the same manner,
the Viewstate for that button is not saved. I turned on the
Trace for the page and it shows first button containing 56 bytes
of Viewstate, but the second button shows zero.

I debugged through the creation of the grid. All components have
EnabledViewState = true. I checked the Viewstate bag before the
page is posted and all buttons contained the "ButtonData"
object. It appears that when the page is rendered, the viewstate
object is not picking up the second button.

Is there some tool that can be used to pull the Viewstate string
apart?


Keith,

Here's an MSDN article w/ code that can be used to parse a view state string:

Understanding ASP.NET View State
http://msdn.microsoft.com/library/de.../viewstate.asp
--
Hope this helps.

Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/
Nov 19 '05 #2

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

Similar topics

1
by: natty | last post by:
Is there any overhead associated with having viewstate enabled but nothing is being stored in the viewstate? I have an aspx page that uses regular HTML, i.e. <input type=submit value=submit>, and...
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...
3
by: Lloyd Sheen | last post by:
I have a page that works fine. I am trying to optimize the page by overriding some of the Information that is being saved in the hidden VIEWSTATE. If I make the properties of the dropdown False...
1
by: D. Shane Fowlkes | last post by:
I have a form in which clicking the submit button calls a "SaveData" sub rountine I wrote. The SaveData rountine inserts data from the form into a table and grabs the ID of the newly inserted...
5
by: Leo J. Hart IV | last post by:
Hello, I'm hoping someone can help me out. I was wondering if the Enabled property of a CheckBox or RadioButton server control is stored in the ViewState. If not, is there some way to to add...
1
by: Graham | last post by:
I have created a server control that reads data from an xml file and renders either a datagrid of entries from a database or group of form controls to allow editing of an individual entry from the...
2
by: fabrice | last post by:
Hi, I have a trouble with my TextBox Control and it's ViewState in my form... The property for it, is FALSE as following : <form id="frmSearchBre4" runat="Server"> <asp:textbox id="myID"...
1
by: Christophe Peillet | last post by:
I have a CompositeControl with two types of properties: 1.) Mapped Properties that map directly to a child control's properties (ex.: this.TextboxText = m_txt.Text). These properties are handled...
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
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
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
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
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
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
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.