Viewstate

  • Thread starter news.microsoft.com
  • Start date
N

news.microsoft.com

Hi,

I created a verry fine site with ASP.net.
But know that it is finished it seems to use a large amount of kb (about 1
100 000kb) on the web.
This all because of the viewstate.
I work with a gridview (50 lines) and in this gridview i use an dropdownlist
with 100 lines.

example:
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="rSnIzp4O9ZksK/NsbEdamg/TRtuZWAR7RNimH+zgYtTneoSR1eIFrj
0R6S1bTKKbIX36J0cMFxVZm43OsV8DCgwnNS5Ndic8cp5ldKuUc7Rl953
5F2s3UKrYE1/U3+9kxwOOdj4xDNqoVl415acLn0/sQZe5Xxr/Zpn8TTNQoNuQ
bCl7CfCx/hLTNPRzjSEMdb+AeBZN8vjoh2nq00zPJmagddpVPJsRAff8OUKBTt

is there an easy way to work around this.

Thanks in advance
Stefan
 
J

Joy

Hi Stefan,
ViewState is associated with Server controls. As a good practice you should
set the property called "EnableViewState" to false for the control that you
donot wish to handle on Server side and you will see that this will reduce
the quantum of ViewState data being transmitted to and fro.

Let me know, if this helps.

regards,
Joy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top