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

Home Posts Topics Members FAQ

viewstate - help!

I've been wondering for a while if I can safely turn off viewstate on a
datagrid.

I read the following article:
http://msdn.microsoft.com/asp.net/us.../viewstate.asp

but ended up more confused than before I read it.

We have a (fairly large) datagrid with editable cells - user edits cells
then submits changes.

Do I need viewstate enabled on the datagrid, basically doubling the HTML
size?

If not how do I deactivate it? (tried setting enableviewstate
property=false, but still see lots of viewstate stuff in HTML output)

Thanks
Nov 18 '05 #1
1 1264
Hi Dave:

It does not sound as if you need viewstate for your datagrid, but I
can't say 100% without seeing the code. Remember though: without
viewstate the DataGrid will need to have DataBind invoked on each trip
to the server.

To see the size of the viewstate each control generates, enable
tracing for the page ( Trace="true" in the @Page directive) and then
view the page. The viewstate size can be found in the Control Tree
section of the trace.

HTH,

--
Scott
http://www.OdeToCode.com
On Wed, 7 Jul 2004 13:47:24 +1200, "Dave Bartlett"
<da*************@yahoo.com> wrote:
I've been wondering for a while if I can safely turn off viewstate on a
datagrid.

I read the following article:
http://msdn.microsoft.com/asp.net/us.../viewstate.asp

but ended up more confused than before I read it.

We have a (fairly large) datagrid with editable cells - user edits cells
then submits changes.

Do I need viewstate enabled on the datagrid, basically doubling the HTML
size?

If not how do I deactivate it? (tried setting enableviewstate
property=false, but still see lots of viewstate stuff in HTML output)

Thanks


Nov 18 '05 #2

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

Similar topics

2
by: James Glover | last post by:
I need help... I am trying to set the Viewstate of a var on an onclick event and let the page post back to get the new value. When i click the button, the first time though (on the post back) it...
1
by: Ralph Soons | last post by:
Hi all, I am trying to save the viewstate in a session instead of storing it in a hidden of the webpage which is default. This because of performance reasons. When I use line 2 in combination...
2
by: Jay Walker | last post by:
I created a custom DataGridColumn based on Marcie Robillard's MSDN Article: Creating Custom Columns for the ASP.NET Datagrid...
1
by: Sky | last post by:
Although I've been using C# for the last month or so, and accepting out of blind faith the ViewState, I do have some nagging questions about it... can you help verify the following statements? ...
1
by: Simon | last post by:
Hi everyone, I have a quick question that I hope someone can help me with: I've made a user control that contains a text box and some validation functionality. This control has a few extra...
7
by: et | last post by:
I'm not sure I understand the use of the ViewState. Do I understand correctly that values of controls are automatically held in a hidden control called ViewState? If so, then why can't we get...
9
by: Jamie | last post by:
I am receiving an Invalid ViewState error after posting back to the same page twice. Consistently the error occurs after the second postback and not after the first. I have looked into creating...
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...
6
by: paul.hester | last post by:
Hi all, Does anyone know why the ViewState would be empty? When I'm receiving a postback, I can access a posted value using controlName.Value but not ViewState. I have EnableViewState set...
2
by: digbydog | last post by:
Hello, I am a bit confused with viewstate - am trying to use viewstate to hold a boolean value which is false initially and then gets set to true after a certain event. I had the following ...
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
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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: 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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
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.