HighTechTalks DotNet Forums  

Viewstate

ASP.net Web Controls microsoft.public.dotnet.framework.aspnet.webcontrols


Discuss Viewstate in the ASP.net Web Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
news.microsoft.com
 
Posts: n/a

Default Viewstate - 06-04-2008 , 03:17 AM






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
0R6S1bTKKbIX36J0cMFxVZm43OsV8DCgwnNS5Ndic8cp5ldKuU c7Rl953
5F2s3UKrYE1/U3+9kxwOOdj4xDNqoVl415acLn0/sQZe5Xxr/Zpn8TTNQoNuQ
bCl7CfCx/hLTNPRzjSEMdb+AeBZN8vjoh2nq00zPJmagddpVPJsRAff8OUK BTt

is there an easy way to work around this.

Thanks in advance
Stefan



Reply With Quote
  #2  
Old   
Joy
 
Posts: n/a

Default RE: Viewstate - 06-05-2008 , 12:43 AM






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

"news.microsoft.com" wrote:

Quote:
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
0R6S1bTKKbIX36J0cMFxVZm43OsV8DCgwnNS5Ndic8cp5ldKuU c7Rl953
5F2s3UKrYE1/U3+9kxwOOdj4xDNqoVl415acLn0/sQZe5Xxr/Zpn8TTNQoNuQ
bCl7CfCx/hLTNPRzjSEMdb+AeBZN8vjoh2nq00zPJmagddpVPJsRAff8OUK BTt

is there an easy way to work around this.

Thanks in advance
Stefan




Reply With Quote
  #3  
Old   
Joy
 
Posts: n/a

Default RE: Viewstate - 06-05-2008 , 12:43 AM



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

"news.microsoft.com" wrote:

Quote:
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
0R6S1bTKKbIX36J0cMFxVZm43OsV8DCgwnNS5Ndic8cp5ldKuU c7Rl953
5F2s3UKrYE1/U3+9kxwOOdj4xDNqoVl415acLn0/sQZe5Xxr/Zpn8TTNQoNuQ
bCl7CfCx/hLTNPRzjSEMdb+AeBZN8vjoh2nq00zPJmagddpVPJsRAff8OUK BTt

is there an easy way to work around this.

Thanks in advance
Stefan




Reply With Quote
  #4  
Old   
Joy
 
Posts: n/a

Default RE: Viewstate - 06-05-2008 , 12:43 AM



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

"news.microsoft.com" wrote:

Quote:
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
0R6S1bTKKbIX36J0cMFxVZm43OsV8DCgwnNS5Ndic8cp5ldKuU c7Rl953
5F2s3UKrYE1/U3+9kxwOOdj4xDNqoVl415acLn0/sQZe5Xxr/Zpn8TTNQoNuQ
bCl7CfCx/hLTNPRzjSEMdb+AeBZN8vjoh2nq00zPJmagddpVPJsRAff8OUK BTt

is there an easy way to work around this.

Thanks in advance
Stefan




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.