It's not unusual (to be lo....cough) for me to have VIEWSTATE ranging from 1
full page to several pages.....
This seems in-efficient - any ideas how to reduce the thing?
Thanks
Kev 7 1525
deactivate the enableviewstate option for the controls where you don't have
to store the state.
for example, a menu, a simple list without any sort/select option authorized
(no need to keep information during a postback). deactivating the viewstate
for these controls reduce the size of the page.
Lookat the http://localhost/folder/trace.axd file to identify which controls
produce your viewstate.
if you use .Net Framework 2.0, deactivating the viewstate for a grid keep
the sort/select commands, while in 1.1 the entire state for the grid must be
saved in the viewstate. (same thing for most of the controls in the v2.0)
There is more options, likestoring the viewstate on the server side,
applying some code to store only the requiered information in the state (but
you have to repopulate your controls) etc...
"Mantorok" <no**@tiscali.co.uk> wrote in message
news:dm**********@newsfeed.th.ifl.net... It's not unusual (to be lo....cough) for me to have VIEWSTATE ranging from 1 full page to several pages.....
This seems in-efficient - any ideas how to reduce the thing?
Thanks Kev
Thanks for the advice, do you think a large viewstate is a particularly bad
idea?
Thanks
Kev
"Jéjé" <wi******@BBBhotmailAAA.com> wrote in message
news:O1**************@TK2MSFTNGP15.phx.gbl... deactivate the enableviewstate option for the controls where you don't have to store the state. for example, a menu, a simple list without any sort/select option authorized (no need to keep information during a postback). deactivating the viewstate for these controls reduce the size of the page.
Lookat the http://localhost/folder/trace.axd file to identify which controls produce your viewstate.
if you use .Net Framework 2.0, deactivating the viewstate for a grid keep the sort/select commands, while in 1.1 the entire state for the grid must be saved in the viewstate. (same thing for most of the controls in the v2.0)
There is more options, likestoring the viewstate on the server side, applying some code to store only the requiered information in the state (but you have to repopulate your controls) etc...
"Mantorok" <no**@tiscali.co.uk> wrote in message news:dm**********@newsfeed.th.ifl.net... It's not unusual (to be lo....cough) for me to have VIEWSTATE ranging from 1 full page to several pages.....
This seems in-efficient - any ideas how to reduce the thing?
Thanks Kev
Mantorok wrote: It's not unusual (to be lo....cough) for me to have VIEWSTATE ranging from 1 full page to several pages.....
This seems in-efficient - any ideas how to reduce the thing?
Jéjé came with a good suggestion...
Another one: if you REALLY need the viewstate, google a bit on "flesk
viewstate", which saves viewstate on the server and only sends an id to
the client.
And why this isnt possible to do without 3rd party libs is beyond me :)
Best regards,
Thomas Skovsende
it could be good for intranet usage and for complex form with edition
capability.
So for pages which are less used then navigation pages which are accessed by
more users more frequently.
remember that a large viewstate impact the bandwidth, and if there is a
postback, the viewstate is sent back to the server, so again an impact on
the network.
In the past I have created a complex form with a lot of controls / sub
controls etc.. designed to configure a chart online (the user can change the
colors, axis, values, etc etc...)
This form was really big with a big viewstate, but the user go to this page
only 1 time a month.
In another side, the page which render the chart is really small with a
small viewstate because the page is accessed every day.
"Mantorok" <no**@tiscali.co.uk> wrote in message
news:dm**********@newsfeed.th.ifl.net... Thanks for the advice, do you think a large viewstate is a particularly bad idea?
Thanks Kev
"Jéjé" <wi******@BBBhotmailAAA.com> wrote in message news:O1**************@TK2MSFTNGP15.phx.gbl... deactivate the enableviewstate option for the controls where you don't have to store the state. for example, a menu, a simple list without any sort/select option authorized (no need to keep information during a postback). deactivating the viewstate for these controls reduce the size of the page.
Lookat the http://localhost/folder/trace.axd file to identify which controls produce your viewstate.
if you use .Net Framework 2.0, deactivating the viewstate for a grid keep the sort/select commands, while in 1.1 the entire state for the grid must be saved in the viewstate. (same thing for most of the controls in the v2.0)
There is more options, likestoring the viewstate on the server side, applying some code to store only the requiered information in the state (but you have to repopulate your controls) etc...
"Mantorok" <no**@tiscali.co.uk> wrote in message news:dm**********@newsfeed.th.ifl.net... It's not unusual (to be lo....cough) for me to have VIEWSTATE ranging from 1 full page to several pages.....
This seems in-efficient - any ideas how to reduce the thing?
Thanks Kev
Ok, that makes sense, thanks very much.
Kev
"Jéjé" <willgart_A_@hotmail_A_.com> wrote in message
news:OH**************@tk2msftngp13.phx.gbl... it could be good for intranet usage and for complex form with edition capability. So for pages which are less used then navigation pages which are accessed by more users more frequently.
remember that a large viewstate impact the bandwidth, and if there is a postback, the viewstate is sent back to the server, so again an impact on the network.
In the past I have created a complex form with a lot of controls / sub controls etc.. designed to configure a chart online (the user can change the colors, axis, values, etc etc...) This form was really big with a big viewstate, but the user go to this page only 1 time a month. In another side, the page which render the chart is really small with a small viewstate because the page is accessed every day.
"Mantorok" <no**@tiscali.co.uk> wrote in message news:dm**********@newsfeed.th.ifl.net... Thanks for the advice, do you think a large viewstate is a particularly bad idea?
Thanks Kev
"Jéjé" <wi******@BBBhotmailAAA.com> wrote in message news:O1**************@TK2MSFTNGP15.phx.gbl... deactivate the enableviewstate option for the controls where you don't have to store the state. for example, a menu, a simple list without any sort/select option authorized (no need to keep information during a postback). deactivating the viewstate for these controls reduce the size of the page.
Lookat the http://localhost/folder/trace.axd file to identify which controls produce your viewstate.
if you use .Net Framework 2.0, deactivating the viewstate for a grid keep the sort/select commands, while in 1.1 the entire state for the grid must be saved in the viewstate. (same thing for most of the controls in the v2.0)
There is more options, likestoring the viewstate on the server side, applying some code to store only the requiered information in the state (but you have to repopulate your controls) etc...
"Mantorok" <no**@tiscali.co.uk> wrote in message news:dm**********@newsfeed.th.ifl.net... It's not unusual (to be lo....cough) for me to have VIEWSTATE ranging from 1 full page to several pages.....
This seems in-efficient - any ideas how to reduce the thing?
Thanks Kev
No 3rd party libs required.
Look into the SavePageStateToPersistanceMedium &
LoadPageStateFromPersistanceMedium Page methods.
These allow full server side viewstate persistance with as little as 2 lines
of code - 1 line of code in each method.
Gerry
"Thomas Skovsende" <t___hsk@net___peo--ple.d-k> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl... Mantorok wrote: It's not unusual (to be lo....cough) for me to have VIEWSTATE ranging
from 1 full page to several pages.....
This seems in-efficient - any ideas how to reduce the thing?
Jéjé came with a good suggestion...
Another one: if you REALLY need the viewstate, google a bit on "flesk viewstate", which saves viewstate on the server and only sends an id to the client.
And why this isnt possible to do without 3rd party libs is beyond me :)
Best regards, Thomas Skovsende
gerry wrote: No 3rd party libs required. Look into the SavePageStateToPersistanceMedium & LoadPageStateFromPersistanceMedium Page methods. These allow full server side viewstate persistance with as little as 2 lines of code - 1 line of code in each method.
Well - kindof! :)
I have to write a PageStatePersister class. :)
What i wanted from MS was something easily configurable from web.config.
Thomas Skovsende This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
by: Steve Drake |
last post by:
All,
I have a CONTROL that contains 1 control (Control ONE), the 1 control that
it can contain 1 or 2 control (Control A and B).
Control A, raises and event and Control ONE receives this event...
|
by: neo |
last post by:
hi,
I am studying ASP.NET and have few questions -
1) The session ID and values of controls is stored in VIEWSTATE
variable. So now when we put EnableViewState="false" in Page directive and...
|
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...
|
by: Lars Grøtteland |
last post by:
Hello!
My ViewState is huge. I have a couple two comboboxes, three edit boxes with
one button each, and a dataGrid.
I'm showing 200 items in the grid, and when the page loads, the viewState is...
|
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...
|
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...
|
by: Gummy |
last post by:
Hello,
I have an ASPX page on which I place a UserControl 15 times (they only need
to be static controls on the page). This UserControl is a set of two
listboxes with radiobuttons above the...
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
|
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,...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
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...
| |